1*ae77b8caSAriel Constenla-Haile /************************************************************** 2*ae77b8caSAriel Constenla-Haile * 3*ae77b8caSAriel Constenla-Haile * Licensed to the Apache Software Foundation (ASF) under one 4*ae77b8caSAriel Constenla-Haile * or more contributor license agreements. See the NOTICE file 5*ae77b8caSAriel Constenla-Haile * distributed with this work for additional information 6*ae77b8caSAriel Constenla-Haile * regarding copyright ownership. The ASF licenses this file 7*ae77b8caSAriel Constenla-Haile * to you under the Apache License, Version 2.0 (the 8*ae77b8caSAriel Constenla-Haile * "License"); you may not use this file except in compliance 9*ae77b8caSAriel Constenla-Haile * with the License. You may obtain a copy of the License at 10*ae77b8caSAriel Constenla-Haile * 11*ae77b8caSAriel Constenla-Haile * http://www.apache.org/licenses/LICENSE-2.0 12*ae77b8caSAriel Constenla-Haile * 13*ae77b8caSAriel Constenla-Haile * Unless required by applicable law or agreed to in writing, 14*ae77b8caSAriel Constenla-Haile * software distributed under the License is distributed on an 15*ae77b8caSAriel Constenla-Haile * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*ae77b8caSAriel Constenla-Haile * KIND, either express or implied. See the License for the 17*ae77b8caSAriel Constenla-Haile * specific language governing permissions and limitations 18*ae77b8caSAriel Constenla-Haile * under the License. 19*ae77b8caSAriel Constenla-Haile * 20*ae77b8caSAriel Constenla-Haile *************************************************************/ 21*ae77b8caSAriel Constenla-Haile 22*ae77b8caSAriel Constenla-Haile #ifndef _SYSTEMCMDMAIL_HXX_ 23*ae77b8caSAriel Constenla-Haile #define _SYSTEMCMDMAIL_HXX_ 24*ae77b8caSAriel Constenla-Haile 25*ae77b8caSAriel Constenla-Haile #include <cppuhelper/compbase3.hxx> 26*ae77b8caSAriel Constenla-Haile #include <cppuhelper/basemutex.hxx> 27*ae77b8caSAriel Constenla-Haile 28*ae77b8caSAriel Constenla-Haile #include <com/sun/star/lang/XServiceInfo.hpp> 29*ae77b8caSAriel Constenla-Haile #include <com/sun/star/uno/XComponentContext.hpp> 30*ae77b8caSAriel Constenla-Haile #include <com/sun/star/system/XSystemMailProvider.hpp> 31*ae77b8caSAriel Constenla-Haile 32*ae77b8caSAriel Constenla-Haile namespace shell 33*ae77b8caSAriel Constenla-Haile { 34*ae77b8caSAriel Constenla-Haile typedef cppu::WeakComponentImplHelper3< 35*ae77b8caSAriel Constenla-Haile com::sun::star::system::XSystemMailProvider, 36*ae77b8caSAriel Constenla-Haile com::sun::star::system::XMailClient, 37*ae77b8caSAriel Constenla-Haile com::sun::star::lang::XServiceInfo > SystemCommandMail_Base; 38*ae77b8caSAriel Constenla-Haile 39*ae77b8caSAriel Constenla-Haile class SystemCommandMail : protected cppu::BaseMutex, 40*ae77b8caSAriel Constenla-Haile public SystemCommandMail_Base 41*ae77b8caSAriel Constenla-Haile { 42*ae77b8caSAriel Constenla-Haile private: 43*ae77b8caSAriel Constenla-Haile ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; 44*ae77b8caSAriel Constenla-Haile ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xConfigurationProvider; 45*ae77b8caSAriel Constenla-Haile 46*ae77b8caSAriel Constenla-Haile public: 47*ae77b8caSAriel Constenla-Haile SystemCommandMail( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext ); 48*ae77b8caSAriel Constenla-Haile ~SystemCommandMail(); 49*ae77b8caSAriel Constenla-Haile 50*ae77b8caSAriel Constenla-Haile virtual ::com::sun::star::uno::Reference< ::com::sun::star::system::XMailClient > SAL_CALL queryMailClient( ) 51*ae77b8caSAriel Constenla-Haile throw (::com::sun::star::uno::RuntimeException); 52*ae77b8caSAriel Constenla-Haile 53*ae77b8caSAriel Constenla-Haile virtual ::com::sun::star::uno::Reference< ::com::sun::star::system::XMailMessage > SAL_CALL createMailMessage( ) 54*ae77b8caSAriel Constenla-Haile throw (::com::sun::star::uno::RuntimeException); 55*ae77b8caSAriel Constenla-Haile 56*ae77b8caSAriel Constenla-Haile virtual void SAL_CALL sendMailMessage( const ::com::sun::star::uno::Reference< ::com::sun::star::system::XMailMessage >& xMailMessage, sal_Int32 aFlag ) 57*ae77b8caSAriel Constenla-Haile throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); 58*ae77b8caSAriel Constenla-Haile 59*ae77b8caSAriel Constenla-Haile virtual ::rtl::OUString SAL_CALL getImplementationName() 60*ae77b8caSAriel Constenla-Haile throw(::com::sun::star::uno::RuntimeException); 61*ae77b8caSAriel Constenla-Haile 62*ae77b8caSAriel Constenla-Haile virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 63*ae77b8caSAriel Constenla-Haile throw(::com::sun::star::uno::RuntimeException); 64*ae77b8caSAriel Constenla-Haile 65*ae77b8caSAriel Constenla-Haile virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) 66*ae77b8caSAriel Constenla-Haile throw(::com::sun::star::uno::RuntimeException); 67*ae77b8caSAriel Constenla-Haile 68*ae77b8caSAriel Constenla-Haile static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > Create( const com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext); 69*ae77b8caSAriel Constenla-Haile static rtl::OUString getImplementationName_static(); 70*ae77b8caSAriel Constenla-Haile static com::sun::star::uno::Sequence< rtl::OUString > getSupportedServiceNames_static(); 71*ae77b8caSAriel Constenla-Haile }; 72*ae77b8caSAriel Constenla-Haile } 73*ae77b8caSAriel Constenla-Haile 74*ae77b8caSAriel Constenla-Haile #endif 75