phoneapp/phoneuiqtviewadapter/tsrc/ut_phonecallheadermanager/bubblemanagerif_stub.h
changeset 77 2be0b271d017
equal deleted inserted replaced
72:c76a0b1755b9 77:2be0b271d017
       
     1 /*!
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Bubble manager's interface.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef BUBBLEMANAGERIF_STUB_H
       
    19 #define BUBBLEMANAGERIF_STUB_H
       
    20 
       
    21 #include <QtCore>
       
    22 #include <bubblemanagerif.h>
       
    23 
       
    24 bool mSetExpandedConferenceCalled;
       
    25 bool mIsExpandedConference;
       
    26 bool mIsConferenceExpanded;
       
    27 
       
    28 class BubbleManagerIFStub : public BubbleManagerIF
       
    29 {
       
    30 
       
    31 public:
       
    32 
       
    33     BubbleManagerIFStub() {};
       
    34     virtual ~BubbleManagerIFStub() {};
       
    35 
       
    36     void startChanges (){};
       
    37     void endChanges (){};
       
    38 
       
    39     int createCallHeader () {};
       
    40 
       
    41     void removeCallHeader (int bubbleId){};
       
    42 
       
    43     /**
       
    44     * Sets call state to header.
       
    45     */
       
    46     void setState (int bubbleId, PhoneCallState state) {};
       
    47 
       
    48     /**
       
    49     * Sets text label to header. For conf also.
       
    50     * Text to be seen in bubble ( e.g. 'on hold' )
       
    51     */
       
    52     void setLabel (
       
    53         int bubbleId,
       
    54         const QString& text,
       
    55         Qt::TextElideMode clipDirection){};
       
    56 
       
    57     /**
       
    58     * Sets caller's line identification ( name or number) to header.
       
    59     * For conf also. Caller's CLI ( e.g. 'Mother' )
       
    60     */
       
    61     void setCli (int bubbleId,
       
    62                  const QString& cliText,
       
    63                  Qt::TextElideMode clipDirection) {};
       
    64 
       
    65     /**
       
    66     * Updates caller's line identification ( name or number) to header.
       
    67     * Caller's CLI ( e.g. 'Daddy' )-
       
    68     */
       
    69     void updateCLI (
       
    70         int bubbleId,
       
    71         const QString& cliText,
       
    72         Qt::TextElideMode clipDirection) {};
       
    73 
       
    74     /**
       
    75     * Number or voip adress, when phonebook name takes Cli.
       
    76     */
       
    77     void setSecondaryCli (
       
    78         int bubbleId,
       
    79         const QString& cliText,
       
    80         Qt::TextElideMode clipDirection = Qt::ElideLeft) {};
       
    81 
       
    82     /**
       
    83     * Sets call time or cost text to header. For conf also.
       
    84     */
       
    85     void setCallTime (int bubbleId, const QString& callTime) {};
       
    86 
       
    87     /**
       
    88     * Updates call time or cost text to header.  For conf also.
       
    89     * Timer or cost text ( e.g. '00:12:34' or '£01.23' ).
       
    90     */
       
    91     void updateCallTime (int bubbleId, const QString& callTime){};
       
    92 
       
    93     /**
       
    94     * Attach a call image to header.
       
    95     */
       
    96     void setCallObjectImage (int bubbleId, const QString &fileName) {};
       
    97 
       
    98     /**
       
    99     * Attach the theme call image to header.
       
   100     */
       
   101     void setCallObjectFromTheme (int bubbleId) {};
       
   102 
       
   103     /**
       
   104     * Sets call flags to header.
       
   105     */
       
   106     void setCallFlags (int bubbleId, int flags){};
       
   107 
       
   108     /**
       
   109     * Sets call flags to header.
       
   110     */
       
   111     void setCallFlag (int bubbleId, BubbleManagerIF::PhoneCallFlags callFlags, bool set) {};
       
   112 
       
   113     /**
       
   114     * Sets number type.
       
   115     */
       
   116     void setNumberType (int bubbleId, PhoneNumberType type){};
       
   117 
       
   118     // ====================================================
       
   119     // For all bubbles
       
   120     // ====================================================
       
   121     //
       
   122 
       
   123     /**
       
   124     * Sets phone muted/unmuted.
       
   125     * @param aIsMuted ETrue if phone is muted.
       
   126     */
       
   127     void setPhoneMuted (bool muted){};
       
   128 
       
   129 
       
   130     // ====================================================
       
   131     // For conference call
       
   132     // ====================================================
       
   133     //
       
   134 
       
   135     /**
       
   136     * Creates a conference call based upon two calls. Bubbles must be
       
   137     * created first.
       
   138     */
       
   139     int createConference (int bubble1, int bubble2) {};
       
   140 
       
   141     /**
       
   142     * Splits conference call into invidual two calls. Call headers stays
       
   143     * in use. Headers' state will not be changed.
       
   144     */
       
   145     void removeConference (){};
       
   146 
       
   147     /**
       
   148     * Adds new call to conference call.
       
   149     */
       
   150     void addRowToConference (int bubbleId) {};
       
   151 
       
   152     /**
       
   153     * Takes specified call out of conference. Use RemoveConference if
       
   154     * conference has only two calls in it. Header's state is same as
       
   155     * before adding it to conference (if not changed inside the conf).
       
   156     */
       
   157     void removeRowFromConference (int bubbleId) {};
       
   158 
       
   159     /**
       
   160     * Counts calls in conference call.
       
   161     */
       
   162     int conferenceRowCount () const {};
       
   163 
       
   164     /**
       
   165     * Sets highlight to specified line in conference.
       
   166     */
       
   167     void setSelectionInConference (int rowNumber){};
       
   168 
       
   169     /**
       
   170     * Sets highlight to specified bubble id in conference.
       
   171     */
       
   172     void setSelectionIdInConference (int bubbleId){};
       
   173 
       
   174     /**
       
   175     * Gets highlighted item in conference.
       
   176     */
       
   177     int selectionInConference () const {};
       
   178 
       
   179     /**
       
   180     * Gets highlighted item in conference.
       
   181     */
       
   182     int selectionIdInConference () const {};
       
   183 
       
   184     /**
       
   185     * Moves highligh one up if possible
       
   186     */
       
   187     void moveHighlightOneUpInConference () {};
       
   188 
       
   189     /**
       
   190     * Moves highligh one down if possible
       
   191     */
       
   192     void moveHighlightOneDownInConference () {};
       
   193 
       
   194     /**
       
   195     * Use this function to expand or shrink conference bubble.
       
   196     */
       
   197     void setExpandedConferenceCallHeader (bool expanded) { mSetExpandedConferenceCalled = true;
       
   198                                                            mIsExpandedConference = expanded; };
       
   199 
       
   200     /**
       
   201     * Query: is conference expanded?
       
   202     */
       
   203     bool isConferenceExpanded () const { return mIsConferenceExpanded;};
       
   204 
       
   205     /**
       
   206     * Number of headers shown on the screen.
       
   207     */
       
   208     int shownHeaderCount () const {};
       
   209 
       
   210     /**
       
   211     * Set CLI used in participant list (text or phonenumber).
       
   212     */
       
   213     void setParticipantListCli (int aBubbleId, ParticipantListCli aParticipantCli) {};
       
   214 
       
   215 
       
   216     // ====================================================
       
   217     // Call bubble actions
       
   218     // ====================================================
       
   219     //
       
   220 
       
   221     /**
       
   222     * Appends new action to call bubble
       
   223     */
       
   224     void addAction (int bubble, HbAction *action) {};
       
   225 
       
   226     /**
       
   227     * Removes all actions from call bubble
       
   228     */
       
   229     void clearActions (int bubble){};
       
   230     
       
   231     /**
       
   232     * Gets graphics widget for action
       
   233     */
       
   234     QGraphicsWidget* graphicsWidgetForAction (HbAction *action) const {};
       
   235 
       
   236     /**
       
   237     * Appends new action to participant list in conference call bubble.
       
   238     */
       
   239     void addParticipantListAction (HbAction *action){};
       
   240 
       
   241     /**
       
   242     * Removes participant list actions from conference call bubble.
       
   243     */
       
   244     void clearParticipantListActions () {};
       
   245 
       
   246 
       
   247     // ====================================================
       
   248     // Bubble state related (multicall)
       
   249     // ====================================================
       
   250     //
       
   251 
       
   252     /**
       
   253     * Bubble shown in expanded position.
       
   254     */
       
   255     int expandedBubble() const {};
       
   256 
       
   257     /**
       
   258     * Sets action that is triggered when user taps collapsed
       
   259     * call bubble and it changes to expanded. Setting null
       
   260     * pointer removes expand action.
       
   261     */
       
   262     void setExpandAction(int bubble, HbAction* action) {};
       
   263 
       
   264     /**
       
   265     * Bubble state (expanded/collapsed) cannot be changed when
       
   266     * disabled is set true.
       
   267     */
       
   268     void setBubbleSelectionDisabled(bool disabled){};
       
   269 };
       
   270 
       
   271 
       
   272 #endif // BUBBLEMANAGERIF_H