LCOV - code coverage report
Current view: top level - ucb/source/ucp/tdoc - tdoc_passwordrequest.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 1 0.0 %
Date: 2014-11-03 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_UCB_SOURCE_UCP_TDOC_TDOC_PASSWORDREQUEST_HXX
      21             : #define INCLUDED_UCB_SOURCE_UCP_TDOC_TDOC_PASSWORDREQUEST_HXX
      22             : 
      23             : #include "com/sun/star/task/PasswordRequestMode.hpp"
      24             : #include "com/sun/star/task/XInteractionPassword.hpp"
      25             : 
      26             : #include "ucbhelper/interactionrequest.hxx"
      27             : 
      28             : namespace tdoc_ucp {
      29             : 
      30             :     /*
      31             :         @usage:
      32             : 
      33             :         uno::Reference< ucb::XCommandEnvironment > Environment = ...;
      34             : 
      35             :         if ( Environment.is() )
      36             :         {
      37             :             uno::Reference< task::XInteractionHandler > xIH
      38             :                 = Environment->getInteractionHandler();
      39             :             if ( xIH.is() )
      40             :             {
      41             :                 rtl::Reference< DocumentPasswordRequest > xRequest
      42             :                     = new DocumentPasswordRequest(
      43             :                         task::PasswordRequestMode_PASSWORD_ENTER,
      44             :                         m_xIdentifier->getContentIdentifier() );
      45             :                 xIH->handle( xRequest.get() );
      46             : 
      47             :                 rtl::Reference< ucbhelper::InteractionContinuation > xSelection
      48             :                     = xRequest->getSelection();
      49             : 
      50             :                 if ( xSelection.is() )
      51             :                 {
      52             :                     // Handler handled the request.
      53             :                     uno::Reference< task::XInteractionAbort > xAbort(
      54             :                         xSelection.get(), uno::UNO_QUERY );
      55             :                     if ( xAbort.is() )
      56             :                     {
      57             :                         // @@@
      58             :                     }
      59             : 
      60             :                     uno::Reference< task::XInteractionRetry > xRetry(
      61             :                         xSelection.get(), uno::UNO_QUERY );
      62             :                     if ( xRetry.is() )
      63             :                     {
      64             :                         // @@@
      65             :                     }
      66             : 
      67             :                     uno::Reference< task::XInteractionPassword > xPassword(
      68             :                         xSelection.get(), uno::UNO_QUERY );
      69             :                     if ( xPassword.is() )
      70             :                     {
      71             :                         OUString aPassword = xPassword->getPassword();
      72             : 
      73             :                         // @@@
      74             :                     }
      75             :                 }
      76             :             }
      77             :         }
      78             : 
      79             :     */
      80             : 
      81           0 :     class DocumentPasswordRequest : public ucbhelper::InteractionRequest
      82             :     {
      83             :     public:
      84             :         DocumentPasswordRequest(
      85             :             com::sun::star::task::PasswordRequestMode eMode,
      86             :             const OUString & rDocumentName );
      87             :     };
      88             : 
      89             : } // namespace tdoc_ucp
      90             : 
      91             : #endif // INCLUDED_UCB_SOURCE_UCP_TDOC_TDOC_PASSWORDREQUEST_HXX
      92             : 
      93             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10