/*
* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Phonebook 2 view graph resource structure header.
*
*/


/**
 * Phonebook 2 view graph.
 * Array of view nodes.
 */
STRUCT PBK2_VIEW_GRAPH
    {
    /// Nodes that the view graph contains.
    /// @see PBK2_VIEW_NODE
    STRUCT nodes[];
    }

/**
 * Phonebook 2 view node.
 * One view node in the view graph.
 */
STRUCT PBK2_VIEW_NODE
    {
    /// Version number
    BYTE version = 0;

    /// Id of the view that this node represents.
    LONG viewId;

    /// Id of the default previous view of this view.
    LONG defaultPrevViewId;

    /// Indicates is this an exit node.
    BYTE exitNode = 0;

    /// Transitions from this view node.
    /// @see PBK2_VIEW_TRANSITION
    STRUCT transitions[];

    /// Id for the tab group that this node belongs to.
    /// Zero, if this view does not belong to any tab group.
    LONG tabGroupId = 0;

    /// Ordering value of this view in the tab group.
    LONG tabGroupOrdering = 0;

    /// Tabs for this node if needed.
    /// @see PBK2_VIEW_NODE_TAB_ARRAY
    LLINK tabs = 0;
    }


/**
 * Phonebook 2 view transition.
 * One transition from a node to another in the view graph.
 */
STRUCT PBK2_VIEW_TRANSITION
    {
    /// Version number
    BYTE version = 0;

    /// Event that enables this transition.
    LONG event;

    /// Target view of this transition.
    LONG targetViewId;
    }

/**
 * Phonebook 2 view node tab array.
 * Array of view node tabs.
 */
STRUCT PBK2_VIEW_NODE_TAB_ARRAY
    {
    /// Items in the array.
    /// @see PBK2_VIEW_NODE_TAB
    STRUCT items[];
    }

/**
 * Phonebook 2 view node tab.
 * Tab definition for a view node.
 */
STRUCT PBK2_VIEW_NODE_TAB
    {
    /// Version number
    BYTE version = 0;

    /// Number of tabs in the tab group to use this tab.
    /// For example, if there are this amount of tabs in the tab group
    /// then the following "tab" definition is used for this view node.
    BYTE tabsInGroup;

    /// Tab definition.
    /// @see TAB
    LLINK tab;

    /// Icon info for the tab.
    /// A link to the array that contains PBK2_ICON_INFOs.
    /// @see PBK2_ICON_INFO
    LLINK iconId = 0;
    }

// End of File
