Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: talk/app/webrtc/peerconnectioninterface.h

Issue 1269843005: Added DtlsCertificate, a ref counted object owning an SSLIdentity (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge with master Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // 7. Once a candidate have been found PeerConnection will call the observer 65 // 7. Once a candidate have been found PeerConnection will call the observer
66 // function OnIceCandidate. Send these candidates to the remote peer. 66 // function OnIceCandidate. Send these candidates to the remote peer.
67 67
68 #ifndef TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ 68 #ifndef TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
69 #define TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ 69 #define TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
70 70
71 #include <string> 71 #include <string>
72 #include <vector> 72 #include <vector>
73 73
74 #include "talk/app/webrtc/datachannelinterface.h" 74 #include "talk/app/webrtc/datachannelinterface.h"
75 #include "talk/app/webrtc/dtlscertificate.h"
75 #include "talk/app/webrtc/dtlsidentitystore.h" 76 #include "talk/app/webrtc/dtlsidentitystore.h"
76 #include "talk/app/webrtc/dtmfsenderinterface.h" 77 #include "talk/app/webrtc/dtmfsenderinterface.h"
77 #include "talk/app/webrtc/dtlsidentitystore.h" 78 #include "talk/app/webrtc/dtlsidentitystore.h"
78 #include "talk/app/webrtc/jsep.h" 79 #include "talk/app/webrtc/jsep.h"
79 #include "talk/app/webrtc/mediastreaminterface.h" 80 #include "talk/app/webrtc/mediastreaminterface.h"
80 #include "talk/app/webrtc/statstypes.h" 81 #include "talk/app/webrtc/statstypes.h"
81 #include "talk/app/webrtc/umametrics.h" 82 #include "talk/app/webrtc/umametrics.h"
82 #include "webrtc/base/fileutils.h" 83 #include "webrtc/base/fileutils.h"
83 #include "webrtc/base/network.h" 84 #include "webrtc/base/network.h"
84 #include "webrtc/base/sslstreamadapter.h" 85 #include "webrtc/base/sslstreamadapter.h"
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 int network_ignore_mask; 497 int network_ignore_mask;
497 498
498 // Sets the maximum supported protocol version. The highest version 499 // Sets the maximum supported protocol version. The highest version
499 // supported by both ends will be used for the connection, i.e. if one 500 // supported by both ends will be used for the connection, i.e. if one
500 // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. 501 // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used.
501 rtc::SSLProtocolVersion ssl_max_version; 502 rtc::SSLProtocolVersion ssl_max_version;
502 }; 503 };
503 504
504 virtual void SetOptions(const Options& options) = 0; 505 virtual void SetOptions(const Options& options) = 0;
505 506
507 // If a |dtls_identity_store| is provided it will be used for
508 // SSLIdentity/DtlsCertificate generation, otherwise a default store will be
509 // used.
506 virtual rtc::scoped_refptr<PeerConnectionInterface> 510 virtual rtc::scoped_refptr<PeerConnectionInterface>
507 CreatePeerConnection( 511 CreatePeerConnection(
508 const PeerConnectionInterface::RTCConfiguration& configuration, 512 const PeerConnectionInterface::RTCConfiguration& configuration,
509 const MediaConstraintsInterface* constraints, 513 const MediaConstraintsInterface* constraints,
510 PortAllocatorFactoryInterface* allocator_factory, 514 PortAllocatorFactoryInterface* allocator_factory,
511 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, 515 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
512 PeerConnectionObserver* observer) = 0; 516 PeerConnectionObserver* observer) = 0;
513 517
518 // With the |certificate| already generated, this version of
519 // CreatePeerConnection can skip the need to generate
520 // SSLIdentity/DtlsCertificate. |certificate| must not be a null reference.
521 virtual rtc::scoped_refptr<PeerConnectionInterface>
522 CreatePeerConnection(
523 const PeerConnectionInterface::RTCConfiguration& configuration,
524 const MediaConstraintsInterface* constraints,
525 PortAllocatorFactoryInterface* allocator_factory,
526 const rtc::scoped_refptr<DtlsCertificate>& certificate,
527 PeerConnectionObserver* observer) = 0;
528
514 // TODO(hbos): Remove below version after clients are updated to above method. 529 // TODO(hbos): Remove below version after clients are updated to above method.
515 // In latest W3C WebRTC draft, PC constructor will take RTCConfiguration, 530 // In latest W3C WebRTC draft, PC constructor will take RTCConfiguration,
516 // and not IceServers. RTCConfiguration is made up of ice servers and 531 // and not IceServers. RTCConfiguration is made up of ice servers and
517 // ice transport type. 532 // ice transport type.
518 // http://dev.w3.org/2011/webrtc/editor/webrtc.html 533 // http://dev.w3.org/2011/webrtc/editor/webrtc.html
519 inline rtc::scoped_refptr<PeerConnectionInterface> 534 inline rtc::scoped_refptr<PeerConnectionInterface>
520 CreatePeerConnection( 535 CreatePeerConnection(
521 const PeerConnectionInterface::IceServers& servers, 536 const PeerConnectionInterface::IceServers& servers,
522 const MediaConstraintsInterface* constraints, 537 const MediaConstraintsInterface* constraints,
523 PortAllocatorFactoryInterface* allocator_factory, 538 PortAllocatorFactoryInterface* allocator_factory,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 CreatePeerConnectionFactory( 595 CreatePeerConnectionFactory(
581 rtc::Thread* worker_thread, 596 rtc::Thread* worker_thread,
582 rtc::Thread* signaling_thread, 597 rtc::Thread* signaling_thread,
583 AudioDeviceModule* default_adm, 598 AudioDeviceModule* default_adm,
584 cricket::WebRtcVideoEncoderFactory* encoder_factory, 599 cricket::WebRtcVideoEncoderFactory* encoder_factory,
585 cricket::WebRtcVideoDecoderFactory* decoder_factory); 600 cricket::WebRtcVideoDecoderFactory* decoder_factory);
586 601
587 } // namespace webrtc 602 } // namespace webrtc
588 603
589 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ 604 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698