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