messagingfw/sendas/client/inc/rsendas.h
changeset 62 db3f5fa34ec7
parent 0 8e480a14352b
equal deleted inserted replaced
60:9f5ae1728557 62:db3f5fa34ec7
       
     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 "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.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__