1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/lowlevellibsandfws/apputils/inc/BACLIPB.H Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,105 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Started by DS, October 1996
1.18 +// Clipboard
1.19 +//
1.20 +//
1.21 +
1.22 +#if !defined(__BACLIPB_H__)
1.23 +#define __BACLIPB_H__
1.24 +
1.25 +#if !defined(__e32std_h__)
1.26 +#include <e32std.h>
1.27 +#endif
1.28 +
1.29 +#if !defined(__e32base_h__)
1.30 +#include <e32base.h>
1.31 +#endif
1.32 +
1.33 +#if !defined(__s32file_h__)
1.34 +#include <s32file.h>
1.35 +#endif
1.36 +
1.37 +class CClipboard : public CBase
1.38 +/** Clipboard. A repository of copied data which is available for pasting. The
1.39 +clipboard storage drive is defined in the HAL layer, in HAL::EClipboardDrive.
1.40 +@publishedAll
1.41 +@released
1.42 +*/
1.43 + {
1.44 +public:
1.45 + IMPORT_C static CClipboard* NewForReadingLC(RFs& aFs);
1.46 + IMPORT_C static CClipboard* NewForReadingL(RFs& aFs);
1.47 + IMPORT_C static CClipboard* NewForWritingLC(RFs& aFs);
1.48 + IMPORT_C static TInt Clear(RFs& aFs);
1.49 + IMPORT_C ~CClipboard();
1.50 + //
1.51 + // Necessary only when writing
1.52 + IMPORT_C void CommitL();
1.53 + //
1.54 + inline CStreamStore& Store() const;
1.55 + inline CStreamDictionary& StreamDictionary() const;
1.56 +
1.57 + // Provide functionality to read and write floating point numbers
1.58 + // in a native format.
1.59 + // (see note below)
1.60 +
1.61 + IMPORT_C void CopyToL ( TReal aReal ) __SOFTFP;
1.62 + IMPORT_C TBool PasteFromL ( TReal& aReal );
1.63 + // Get a number from the clipboard, return false if it is not present
1.64 + // in which case the parameter is unmodified.
1.65 +
1.66 + // Gets the drive where the clipboard file is stored
1.67 + IMPORT_C static TDriveName ClipboardFileDrive();
1.68 +
1.69 +
1.70 +private:
1.71 + inline CClipboard(RFs& aFs);
1.72 + static CClipboard* NewLC(RFs& aFs);
1.73 + void ConstructReadL();
1.74 +private:
1.75 + CFileStore* iStore;
1.76 + CStreamDictionary* iStreamDictionary;
1.77 + RFs& iFs;
1.78 + };
1.79 +
1.80 +
1.81 +inline CStreamStore& CClipboard::Store() const
1.82 + /** Returns a reference to the clipboard's file store.
1.83 +
1.84 + @return A reference to the clipboard's store. */
1.85 + { return *iStore; }
1.86 +
1.87 +
1.88 +inline CStreamDictionary& CClipboard::StreamDictionary() const
1.89 + /** Returns a reference to the clipboard's stream dictionary.
1.90 +
1.91 + @return A reference to the clipboard's stream dictionary. */
1.92 + { return *iStreamDictionary; }
1.93 +
1.94 +
1.95 +// NB the floating point copy and paste member functions are currently the only
1.96 +// ones of this type defined in the class. Most clipboard data consists of
1.97 +// more complex objects known only at a higher level than BAFL. This raises the
1.98 +// question of whether the clipboard should provide equivalent functionality
1.99 +// for other basic data types or whether there should be a utility class
1.100 +// elsewhere to do all such operations in a standard format and handle the
1.101 +// multiple representations too. - PNJ, January 1997.
1.102 +
1.103 +
1.104 +
1.105 +
1.106 +
1.107 +
1.108 +#endif