mds_plat/metadata_engine_api/inc/mdesession.h
branchRCL_3
changeset 15 3cebc1a84278
parent 0 c53acadfccc6
equal deleted inserted replaced
14:646a02f170b9 15:3cebc1a84278
   220 	 */
   220 	 */
   221 	virtual void HandleObjectNotification(CMdESession& aSession, 
   221 	virtual void HandleObjectNotification(CMdESession& aSession, 
   222 						TObserverNotificationType aType,
   222 						TObserverNotificationType aType,
   223 						const RArray<TItemId>& aObjectIdArray) = 0;
   223 						const RArray<TItemId>& aObjectIdArray) = 0;
   224     };
   224     };
       
   225 
       
   226 class MMdEObjectObserverWithUri
       
   227     {
       
   228 public:
       
   229 
       
   230     /**
       
   231      * Called to notify the observer that new objects has been
       
   232      * added/modified/removed in the metadata engine database.
       
   233      * 
       
   234      * @param aSession session
       
   235      * @param aType defines if object was added/modified/remove
       
   236      * @param aObjectIdArray IDs of added object
       
   237      * @param aUriArray Uris of added object
       
   238      * @see CMdESession::AddObjectObserverL
       
   239      * @see CMdELogicCondition
       
   240      */
       
   241     virtual void HandleUriObjectNotification(CMdESession& aSession, 
       
   242                         TObserverNotificationType aType,
       
   243                         const RArray<TItemId>& aObjectIdArray,
       
   244                         const RPointerArray<HBufC>& aObjectUriArray) = 0;
       
   245     };
   225     
   246     
   226 /**
   247 /**
   227  * Observer interface for modifications of the objects in the metadata engine 
   248  * Observer interface for modifications of the objects in the metadata engine 
   228  * database.
   249  * database.
   229  */
   250  */
  1710 	 *                     with matching GUID
  1731 	 *                     with matching GUID
  1711 	 */
  1732 	 */
  1712 	virtual void SetObjectToPresentByGuidL( 
  1733 	virtual void SetObjectToPresentByGuidL( 
  1713 			const TInt64& aGuidHigh, const TInt64& aGuidLow ) = 0;
  1734 			const TInt64& aGuidHigh, const TInt64& aGuidLow ) = 0;
  1714 	
  1735 	
       
  1736     /**
       
  1737       * Adds a new object observer to the session. No duplicate observers are 
       
  1738       * allowed.
       
  1739       *
       
  1740       * The following restrictions are placed on the condition nodes:
       
  1741       * - Only CMdEObjectCondition and CMdEPropertyCondition nodes can be
       
  1742       *   used. CMdERangePropertyConditions are not allowed.
       
  1743       * - No nested logic conditions are allowed.
       
  1744       * 
       
  1745       * Be adviced, this version with the URI in the callback is much less
       
  1746       * efficient than using version without the URI
       
  1747       *
       
  1748       * @param aObserver   Observer.
       
  1749       * @param aCondition  Condition that the objects, about which the observer
       
  1750       *                    wants to receive notifications, must fulfill or NULL,
       
  1751       *                    to receive notifications of all objects.
       
  1752       *                    Ownership of the condition is transferred to the
       
  1753       *                    session.
       
  1754       * @param aNotificationType what event type (add, modify, remove) should
       
  1755       *                          be notified to client
       
  1756       * @param aNamespaceDef specified namespace (if namespace is NULL, the 
       
  1757       *                      default namespace is used)
       
  1758       * @param aUriRequired determines if uri is required in the callback
       
  1759       * 
       
  1760       * @leave KErrAlreadyExists if the same observer has already been added
       
  1761       */
       
  1762      virtual void AddObjectObserverWithUriL( MMdEObjectObserverWithUri& aObserver,
       
  1763              CMdELogicCondition* aCondition = NULL, 
       
  1764              TUint32 aNotificationType = ENotifyAdd | ENotifyModify | ENotifyRemove,
       
  1765              CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
       
  1766 
       
  1767      /**
       
  1768       * Removes the specified object observer from the session.
       
  1769       *
       
  1770       * @param aObserver  observer
       
  1771       */
       
  1772      virtual void RemoveObjectObserverWithUriL( MMdEObjectObserverWithUri& aObserver, 
       
  1773                              CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
       
  1774      
  1715 protected:
  1775 protected:
  1716 
  1776 
  1717 	/* Constructors. */
  1777 	/* Constructors. */
  1718 
  1778 
  1719 	/**
  1779 	/**