193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)/*
293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * Copyright (C) 2012 Google Inc. All rights reserved.
393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *
493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * Redistribution and use in source and binary forms, with or without
593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * modification, are permitted provided that the following conditions are
693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * met:
793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *
893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *     * Redistributions of source code must retain the above copyright
993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * notice, this list of conditions and the following disclaimer.
1093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *     * Redistributions in binary form must reproduce the above
1193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * copyright notice, this list of conditions and the following disclaimer
1293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * in the documentation and/or other materials provided with the
1393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * distribution.
1493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *     * Neither the name of Google Inc. nor the names of its
1593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * contributors may be used to endorse or promote products derived from
1693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * this software without specific prior written permission.
1793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *
1893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) */
3093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
3193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#ifndef WebRTCSessionDescriptionRequest_h
3293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#define WebRTCSessionDescriptionRequest_h
3393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
3493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#include "WebCommon.h"
3593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#include "WebNonCopyable.h"
3693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#include "WebPrivatePtr.h"
3793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#include "WebString.h"
3893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
39c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)namespace blink {
4093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
41e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)class RTCSessionDescriptionRequest;
4293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)class WebRTCSessionDescription;
4393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
4493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)class WebRTCSessionDescriptionRequest {
4593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)public:
4693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    class ExtraData {
4793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    public:
4893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)        virtual ~ExtraData() { }
4993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    };
5093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
5193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    WebRTCSessionDescriptionRequest() { }
5293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    WebRTCSessionDescriptionRequest(const WebRTCSessionDescriptionRequest& other) { assign(other); }
5393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    ~WebRTCSessionDescriptionRequest() { reset(); }
5493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
5593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    WebRTCSessionDescriptionRequest& operator=(const WebRTCSessionDescriptionRequest& other)
5693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    {
5793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)        assign(other);
5893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)        return *this;
5993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    }
6093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
6109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void assign(const WebRTCSessionDescriptionRequest&);
6293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
6309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void reset();
6493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    bool isNull() const { return m_private.isNull(); }
6593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
6609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void requestSucceeded(const WebRTCSessionDescription&) const;
6709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void requestFailed(const WebString& error) const;
6893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
6993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // Extra data associated with this object.
7093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // If non-null, the extra data pointer will be deleted when the object is destroyed.
7193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // Setting the extra data pointer will cause any existing non-null
7293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // extra data pointer to be deleted.
7309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    BLINK_PLATFORM_EXPORT ExtraData* extraData() const;
7409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*);
7593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
7609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#if INSIDE_BLINK
777242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci    BLINK_PLATFORM_EXPORT WebRTCSessionDescriptionRequest(RTCSessionDescriptionRequest*);
7893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#endif
7993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
8093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)private:
81e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)    WebPrivatePtr<RTCSessionDescriptionRequest> m_private;
8293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)};
8393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
8451b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)} // namespace blink
8593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
8693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#endif // WebRTCSessionDescriptionRequest_h
87