1*408a4873SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*408a4873SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*408a4873SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*408a4873SAndrew Rist * distributed with this work for additional information 6*408a4873SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*408a4873SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*408a4873SAndrew Rist * "License"); you may not use this file except in compliance 9*408a4873SAndrew Rist * with the License. You may obtain a copy of the License at 10*408a4873SAndrew Rist * 11*408a4873SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*408a4873SAndrew Rist * 13*408a4873SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*408a4873SAndrew Rist * software distributed under the License is distributed on an 15*408a4873SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*408a4873SAndrew Rist * KIND, either express or implied. See the License for the 17*408a4873SAndrew Rist * specific language governing permissions and limitations 18*408a4873SAndrew Rist * under the License. 19*408a4873SAndrew Rist * 20*408a4873SAndrew Rist *************************************************************/ 21*408a4873SAndrew Rist 22*408a4873SAndrew Rist 23cdf0e10cSrcweir#ifndef __com_sun_star_container_XContainerQuery_idl__ 24cdf0e10cSrcweir#define __com_sun_star_container_XContainerQuery_idl__ 25cdf0e10cSrcweir 26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__ 27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl> 28cdf0e10cSrcweir#endif 29cdf0e10cSrcweir 30cdf0e10cSrcweir#ifndef __com_sun_star_container_XEnumeration_idl__ 31cdf0e10cSrcweir#include <com/sun/star/container/XEnumeration.idl> 32cdf0e10cSrcweir#endif 33cdf0e10cSrcweir 34cdf0e10cSrcweir#ifndef __com_sun_star_beans_NamedValue_idl__ 35cdf0e10cSrcweir#include <com/sun/star/beans/NamedValue.idl> 36cdf0e10cSrcweir#endif 37cdf0e10cSrcweir 38cdf0e10cSrcweir//============================================================================= 39cdf0e10cSrcweir 40cdf0e10cSrcweirmodule com { module sun { module star { module container { 41cdf0e10cSrcweir 42cdf0e10cSrcweir//============================================================================= 43cdf0e10cSrcweir/** supports simple query feature on a container 44cdf0e10cSrcweir 45cdf0e10cSrcweir <p> 46cdf0e10cSrcweir This interface makes it possible to create sub sets of container items 47cdf0e10cSrcweir which serve specified search criterion. 48cdf0e10cSrcweir <p> 49cdf0e10cSrcweir */ 50cdf0e10cSrcweirpublished interface XContainerQuery: com::sun::star::uno::XInterface 51cdf0e10cSrcweir{ 52cdf0e10cSrcweir //------------------------------------------------------------------------- 53cdf0e10cSrcweir /** creates a sub set of container items which match given query command 54cdf0e10cSrcweir 55cdf0e10cSrcweir <p> 56cdf0e10cSrcweir Items of this sub set must match used query string. Format of query depends 57cdf0e10cSrcweir from real implementation. Using of "param=value" pairs isn't neccessary. 58cdf0e10cSrcweir So it's possible to combine different parameters as one simple command 59cdf0e10cSrcweir string. 60cdf0e10cSrcweir <p> 61cdf0e10cSrcweir 62cdf0e10cSrcweir @param Query items of sub set must match to this query<br> 63cdf0e10cSrcweir example:<br> 64cdf0e10cSrcweir (1)<br> 65cdf0e10cSrcweir query as parameter sequence to return all elements wich match 66cdf0e10cSrcweir the name pattern and supports a special feature; sort it ascending<br> 67cdf0e10cSrcweir "name=*myname_??_;sort=ascending;feature=VISIBLE"<br> 68cdf0e10cSrcweir (2)<br> 69cdf0e10cSrcweir query as command to return all elements which support special feature 70cdf0e10cSrcweir and match by name pattern;ascending sort is the default<br> 71cdf0e10cSrcweir "getAllVisible(*myname_??_)"<br> 72cdf0e10cSrcweir 73cdf0e10cSrcweir @returns an sub set of container items as an enumeration. 74cdf0e10cSrcweir */ 75cdf0e10cSrcweir XEnumeration createSubSetEnumerationByQuery( [in] string Query ); 76cdf0e10cSrcweir 77cdf0e10cSrcweir //------------------------------------------------------------------------- 78cdf0e10cSrcweir /** creates a sub set of container items which supports searched properties as minimum 79cdf0e10cSrcweir 80cdf0e10cSrcweir <p> 81cdf0e10cSrcweir It's not possible to use special commands or search specific parameters here. 82cdf0e10cSrcweir You can match by properties only. Enumerated elements must provide queried 83cdf0e10cSrcweir properties as minimum. Not specified properties willn't be used for searching. 84cdf0e10cSrcweir <p> 85cdf0e10cSrcweir 86cdf0e10cSrcweir @param Properties items of sub set must support given properties as minimum<br> 87cdf0e10cSrcweir example:<br> 88cdf0e10cSrcweir (supported)<br> 89cdf0e10cSrcweir search for items wich match the name pattern and supports the VISIBLE feature<br> 90cdf0e10cSrcweir Parameters[0].Name = "name"<br> 91cdf0e10cSrcweir Parameters[0].Value = "*myname_??_"<br> 92cdf0e10cSrcweir Parameters[1].Name = "feature"<br> 93cdf0e10cSrcweir Parameters[1].Value = "VISIBLE"<br> 94cdf0e10cSrcweir ...<br> 95cdf0e10cSrcweir (unsupported)<br> 96cdf0e10cSrcweir "sort" isn't a property of a container item! 97cdf0e10cSrcweir Parameters[0].Name = "sort"<br> 98cdf0e10cSrcweir Parameters[0].Value = "ascending"<br> 99cdf0e10cSrcweir ...<br> 100cdf0e10cSrcweir 101cdf0e10cSrcweir @returns an sub set of container items as an enumeration. 102cdf0e10cSrcweir */ 103cdf0e10cSrcweir XEnumeration createSubSetEnumerationByProperties( [in] sequence< com::sun::star::beans::NamedValue > Properties ); 104cdf0e10cSrcweir}; 105cdf0e10cSrcweir 106cdf0e10cSrcweir//============================================================================= 107cdf0e10cSrcweir 108cdf0e10cSrcweir}; }; }; }; 109cdf0e10cSrcweir 110cdf0e10cSrcweir#endif 111