epoc32/include/rsendas.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // 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
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __RSENDAS_H__
    17 #define __RSENDAS_H__
    18 
    19 #include <e32base.h>
    20 
    21 class CSendAsMessageTypes;
    22 class CSendAsAccounts;
    23 
    24 /**
    25 The default number of message slots available to a session. This determines the
    26 number of outstanding requests the client may have with the server at any one
    27 time.
    28 */
    29 const TInt KSendAsDefaultMessageSlots = 4;
    30 
    31 /**
    32 Encapsulates a session with the SendAs Server.
    33 
    34 This class allows a user to determine the message types available to the SendAs
    35 server and also provides functionality for clients to filter this list to find 
    36 the UIDs required to create messages.
    37 
    38 @publishedAll
    39 @released
    40 */
    41 class RSendAs : public RSessionBase
    42 	{
    43 public:
    44 
    45 /**
    46 Defines the condition-checking of message capabilities. These are progressively
    47 added to refine the list of available MTMs.
    48 */
    49 	enum TSendAsConditionType
    50 		{
    51 		/**
    52 		No MTMs are removed as a result of applying this condition to the
    53 		filtering.
    54 		*/
    55 		ESendAsNoCondition,
    56 		/**
    57 		Only MTMs whose capabilities match the given value will remain as a
    58 		result of applying this condition to the filtering.
    59 		*/
    60 		ESendAsEquals,
    61 		/**
    62 		Only MTMs whose capabilities do not match the given value will remain 
    63 		as a result of applying this condition to the filtering.
    64 		*/
    65 		ESendAsNotEquals,
    66 		/**
    67 		Only MTMs whose capabilities greater than the given value will remain
    68 		as a result of applying this condition to the filtering.
    69 		*/
    70 		ESendAsGreaterThan,
    71 		/**
    72 		Only MTMs whose capabilities less than the given value will remain as a
    73 		result of applying this condition to the filtering.
    74 		*/
    75 		ESendAsLessThan,
    76 		/**
    77 		Only MTMs whose capabilities result non-zero value when bitwise ANDed
    78 		with the given value will remain as a result of applying this condition
    79 		to the filtering.
    80 		*/
    81 		ESendAsBitwiseAnd,
    82 		/**
    83 		Only MTMs whose capabilities result non-zero value when bitwise ORed
    84 		with the given value will remain as a result of applying this condition
    85 		to the filtering.
    86 		*/
    87 		ESendAsBitwiseOr,
    88 		/**
    89 		Only MTMs whose capabilities result non-zero value when bitwise NANDed
    90 		with the given value will remain as a result of applying this condition
    91 		to the filtering.
    92 		*/
    93 		ESendAsBitwiseNand,
    94 		/**
    95 		Only MTMs whose capabilities result non-zero value when bitwise NORed
    96 		with the given value will remain as a result of applying this condition
    97 		to the filtering.
    98 		*/
    99 		ESendAsBitwiseNor
   100 		};
   101 
   102 public:
   103 	IMPORT_C TInt Connect();
   104 	IMPORT_C TInt Connect(TInt aMessageSlots);
   105 	
   106 	IMPORT_C void FilteredMessageTypesL(CSendAsMessageTypes& aMessageTypeInfo);
   107 	IMPORT_C TInt FilterAgainstCapability(TUid aMessageCapability);
   108 	IMPORT_C TInt FilterAgainstCapability(TUid aMessageCapability, TInt aValue, TSendAsConditionType aConditionType);
   109 	IMPORT_C TInt ResetMessageFilter();
   110 	
   111 	IMPORT_C void AvailableAccountsL(TUid aMessageType, CSendAsAccounts& aAccounts);
   112 
   113 private:
   114 	TAny* iAny; // Future proofing.
   115 	};
   116 
   117 #endif	//  __RSENDAS_H__