messagingapp/smartmessaging/ringbc/inc/ringbc.h
changeset 23 238255e8b033
child 27 e4592d119491
equal deleted inserted replaced
5:4697dfb2d7ad 23:238255e8b033
       
     1 /*
       
     2  * Copyright (c) 2002 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:  Handles the ringing tone bio control. 
       
    15  *     Finds whether ringing tone is valid and saves the ringing
       
    16  *     tone to the file system.
       
    17  *
       
    18  */
       
    19 
       
    20 #ifndef MSGRINGBC_H
       
    21 #define MSGRINGBC_H
       
    22 
       
    23 #include <qobject.h>
       
    24 
       
    25 #ifdef  RINGBC_DLL
       
    26 #define RINGBC_DLL_EXPORT Q_DECL_EXPORT
       
    27 #else
       
    28 #define RINGBC_DLL_EXPORT Q_DECL_IMPORT
       
    29 #endif
       
    30 
       
    31 class RingBcPrivate;
       
    32 
       
    33 
       
    34 class RINGBC_DLL_EXPORT RingBc
       
    35 {
       
    36 public:
       
    37     
       
    38     /**
       
    39      * Constructor.
       
    40      */
       
    41     RingBc();
       
    42 
       
    43     /**
       
    44      * Destructor
       
    45      */
       
    46     ~RingBc();
       
    47 
       
    48 public: 
       
    49 	   
       
    50 	/**
       
    51 	 * Saves the given riging tone. 
       
    52 	 * @param path ringing tone binary file path.
       
    53 	 */   
       
    54 	 void saveTone(const QString &path);
       
    55 	   
       
    56 	 /**
       
    57 	  * Returns title for the given ringing tone.
       
    58 	  * @param path ringing tone binary file path.
       
    59 	  * @return QString title of the ringing tone.
       
    60 	  * 
       
    61 	  * returns null string if any error occurs in parsing
       
    62 	  * or unsupported type.
       
    63 	  */
       
    64 	 QString toneTitle(const QString &path);
       
    65 	 
       
    66 	 /**
       
    67 	  * Asks the save query.
       
    68 	  * @return bool true if user selected save else flase
       
    69 	  */
       
    70 	static bool askSaveQuery();
       
    71 	 
       
    72 private:
       
    73    
       
    74     /**
       
    75      * Private implementation.
       
    76      * Owned.
       
    77      */
       
    78     RingBcPrivate* d_ptr;
       
    79 };
       
    80 
       
    81     
       
    82 #endif  // not defined MSGRINGBC_H
       
    83 // End of file