1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: jobresult.hxx,v $
10 * $Revision: 1.4.82.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __FRAMEWORK_JOBS_JOBRESULT_HXX_
32 #define __FRAMEWORK_JOBS_JOBRESULT_HXX_
34 //_______________________________________
37 #include <threadhelp/threadhelpbase.hxx>
38 #include <macros/debug.hxx>
42 //_______________________________________
44 #include <com/sun/star/beans/NamedValue.hpp>
45 #include <com/sun/star/frame/DispatchResultEvent.hpp>
47 //_______________________________________
49 #include <rtl/ustring.hxx>
51 //_______________________________________
56 //_______________________________________
59 //_______________________________________
61 @short represent a result of a finished job execution
62 @descr Such result instance transport all neccessarry
63 data from the code place where the job was finished
64 to the outside code, where e.g. listener must be notified.
66 class JobResult
: private ThreadHelpBase
68 //___________________________________
74 These enum values are used to build a flag mask of possible set
75 parts of an analyzed pure job execution result.
76 An user of this class can decide, if a member of us can be valid
77 or not. So it can indicate, if a job used the special part inside
78 his returned result protocol.
79 To be usable as flags - it must be values of set {0,1,2,4,8,16 ...}!
89 //___________________________________
94 /** hold the original pure result, which was given back by an
96 We analyze it and use it to set all our other members.
98 css::uno::Any m_aPureResult
;
101 an user of us must know, which (possible) parts of
102 a "pure result" was realy set by an executed job.
103 Means which other members of this class are valid.
104 This mask can be used to find it out.
109 a job can have persistent data
110 They are part of the pure result and will be used to
111 write it to the configuration. But that's part of any
112 user of us. We provide this information here only.
114 css::uno::Sequence
< css::beans::NamedValue
> m_lArguments
;
117 an executed job can force his deactivation
118 But we provide this information here only.
119 Doing so is part of any user of us.
121 sal_Bool m_bDeactivate
;
124 represent the part "DispatchResult"
125 It's a full filled event type, which was given
126 back by the executed job. Any user of us can send
127 it to his registered result listener directly.
129 css::frame::DispatchResultEvent m_aDispatchResult
;
131 //___________________________________
137 JobResult( const com::sun::star::uno::Any
& aResult
);
138 JobResult( const JobResult
& rCopy
);
139 virtual ~JobResult( );
141 void operator=( const JobResult
& rCopy
);
143 sal_Bool
existPart ( sal_uInt32 eParts
) const;
144 css::uno::Sequence
< css::beans::NamedValue
> getArguments ( ) const;
145 css::frame::DispatchResultEvent
getDispatchResult( ) const;
148 } // namespace framework
150 #endif // __FRAMEWORK_JOBS_JOBRESULT_HXX_