/usr/include/thunderbird/IPeerConnection.h is in thunderbird-dev 1:24.4.0+build1-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 | /*
* DO NOT EDIT. THIS FILE IS GENERATED FROM /build/buildd/thunderbird-24.4.0+build1/mozilla/dom/media/bridge/IPeerConnection.idl
*/
#ifndef __gen_IPeerConnection_h__
#define __gen_IPeerConnection_h__
#ifndef __gen_nsIThread_h__
#include "nsIThread.h"
#endif
#ifndef __gen_nsIDOMWindow_h__
#include "nsIDOMWindow.h"
#endif
#ifndef __gen_nsIPropertyBag2_h__
#include "nsIPropertyBag2.h"
#endif
#include "jspubtd.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIDOMMediaStream; /* forward declaration */
class nsIDOMDataChannel; /* forward declaration */
/* starting interface: IPeerConnectionManager */
#define IPEERCONNECTIONMANAGER_IID_STR "c2218bd2-2648-4701-8fa6-305d3379e9f8"
#define IPEERCONNECTIONMANAGER_IID \
{0xc2218bd2, 0x2648, 0x4701, \
{ 0x8f, 0xa6, 0x30, 0x5d, 0x33, 0x79, 0xe9, 0xf8 }}
class NS_NO_VTABLE IPeerConnectionManager : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(IPEERCONNECTIONMANAGER_IID)
/* boolean hasActivePeerConnection (in unsigned long innerWindowID); */
NS_IMETHOD HasActivePeerConnection(uint32_t innerWindowID, bool *_retval) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(IPeerConnectionManager, IPEERCONNECTIONMANAGER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_IPEERCONNECTIONMANAGER \
NS_IMETHOD HasActivePeerConnection(uint32_t innerWindowID, bool *_retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_IPEERCONNECTIONMANAGER(_to) \
NS_IMETHOD HasActivePeerConnection(uint32_t innerWindowID, bool *_retval) { return _to HasActivePeerConnection(innerWindowID, _retval); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_IPEERCONNECTIONMANAGER(_to) \
NS_IMETHOD HasActivePeerConnection(uint32_t innerWindowID, bool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasActivePeerConnection(innerWindowID, _retval); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class _MYCLASS_ : public IPeerConnectionManager
{
public:
NS_DECL_ISUPPORTS
NS_DECL_IPEERCONNECTIONMANAGER
_MYCLASS_();
private:
~_MYCLASS_();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, IPeerConnectionManager)
_MYCLASS_::_MYCLASS_()
{
/* member initializers and constructor code */
}
_MYCLASS_::~_MYCLASS_()
{
/* destructor code */
}
/* boolean hasActivePeerConnection (in unsigned long innerWindowID); */
NS_IMETHODIMP _MYCLASS_::HasActivePeerConnection(uint32_t innerWindowID, bool *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
#define IPEERCONNECTION_MANAGER_CONTRACTID "@mozilla.org/dom/peerconnectionmanager;1"
/* starting interface: IPeerConnectionObserver */
#define IPEERCONNECTIONOBSERVER_IID_STR "cf9152f0-c9a8-4093-9435-1daa056e0177"
#define IPEERCONNECTIONOBSERVER_IID \
{0xcf9152f0, 0xc9a8, 0x4093, \
{ 0x94, 0x35, 0x1d, 0xaa, 0x05, 0x6e, 0x01, 0x77 }}
class NS_NO_VTABLE IPeerConnectionObserver : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(IPEERCONNECTIONOBSERVER_IID)
enum {
kReadyState = 1,
kIceState = 2,
kSdpState = 3,
kSipccState = 4,
kSignalingState = 5
};
/* void onCreateOfferSuccess (in string offer); */
NS_IMETHOD OnCreateOfferSuccess(const char * offer) = 0;
/* void onCreateOfferError (in unsigned long name, in string message); */
NS_IMETHOD OnCreateOfferError(uint32_t name, const char * message) = 0;
/* void onCreateAnswerSuccess (in string answer); */
NS_IMETHOD OnCreateAnswerSuccess(const char * answer) = 0;
/* void onCreateAnswerError (in unsigned long name, in string message); */
NS_IMETHOD OnCreateAnswerError(uint32_t name, const char * message) = 0;
/* void onSetLocalDescriptionSuccess (); */
NS_IMETHOD OnSetLocalDescriptionSuccess(void) = 0;
/* void onSetRemoteDescriptionSuccess (); */
NS_IMETHOD OnSetRemoteDescriptionSuccess(void) = 0;
/* void onSetLocalDescriptionError (in unsigned long name, in string message); */
NS_IMETHOD OnSetLocalDescriptionError(uint32_t name, const char * message) = 0;
/* void onSetRemoteDescriptionError (in unsigned long name, in string message); */
NS_IMETHOD OnSetRemoteDescriptionError(uint32_t name, const char * message) = 0;
/* void onAddIceCandidateSuccess (); */
NS_IMETHOD OnAddIceCandidateSuccess(void) = 0;
/* void onAddIceCandidateError (in unsigned long name, in string message); */
NS_IMETHOD OnAddIceCandidateError(uint32_t name, const char * message) = 0;
/* void notifyDataChannel (in nsIDOMDataChannel channel); */
NS_IMETHOD NotifyDataChannel(nsIDOMDataChannel *channel) = 0;
/* void notifyConnection (); */
NS_IMETHOD NotifyConnection(void) = 0;
/* void notifyClosedConnection (); */
NS_IMETHOD NotifyClosedConnection(void) = 0;
/* void onStateChange (in unsigned long state); */
NS_IMETHOD OnStateChange(uint32_t state) = 0;
/* void onAddStream (in nsIDOMMediaStream stream); */
NS_IMETHOD OnAddStream(nsIDOMMediaStream *stream) = 0;
/* void onRemoveStream (); */
NS_IMETHOD OnRemoveStream(void) = 0;
/* void onAddTrack (); */
NS_IMETHOD OnAddTrack(void) = 0;
/* void onRemoveTrack (); */
NS_IMETHOD OnRemoveTrack(void) = 0;
/* void foundIceCandidate (in string candidate); */
NS_IMETHOD FoundIceCandidate(const char * candidate) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(IPeerConnectionObserver, IPEERCONNECTIONOBSERVER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_IPEERCONNECTIONOBSERVER \
NS_IMETHOD OnCreateOfferSuccess(const char * offer); \
NS_IMETHOD OnCreateOfferError(uint32_t name, const char * message); \
NS_IMETHOD OnCreateAnswerSuccess(const char * answer); \
NS_IMETHOD OnCreateAnswerError(uint32_t name, const char * message); \
NS_IMETHOD OnSetLocalDescriptionSuccess(void); \
NS_IMETHOD OnSetRemoteDescriptionSuccess(void); \
NS_IMETHOD OnSetLocalDescriptionError(uint32_t name, const char * message); \
NS_IMETHOD OnSetRemoteDescriptionError(uint32_t name, const char * message); \
NS_IMETHOD OnAddIceCandidateSuccess(void); \
NS_IMETHOD OnAddIceCandidateError(uint32_t name, const char * message); \
NS_IMETHOD NotifyDataChannel(nsIDOMDataChannel *channel); \
NS_IMETHOD NotifyConnection(void); \
NS_IMETHOD NotifyClosedConnection(void); \
NS_IMETHOD OnStateChange(uint32_t state); \
NS_IMETHOD OnAddStream(nsIDOMMediaStream *stream); \
NS_IMETHOD OnRemoveStream(void); \
NS_IMETHOD OnAddTrack(void); \
NS_IMETHOD OnRemoveTrack(void); \
NS_IMETHOD FoundIceCandidate(const char * candidate);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_IPEERCONNECTIONOBSERVER(_to) \
NS_IMETHOD OnCreateOfferSuccess(const char * offer) { return _to OnCreateOfferSuccess(offer); } \
NS_IMETHOD OnCreateOfferError(uint32_t name, const char * message) { return _to OnCreateOfferError(name, message); } \
NS_IMETHOD OnCreateAnswerSuccess(const char * answer) { return _to OnCreateAnswerSuccess(answer); } \
NS_IMETHOD OnCreateAnswerError(uint32_t name, const char * message) { return _to OnCreateAnswerError(name, message); } \
NS_IMETHOD OnSetLocalDescriptionSuccess(void) { return _to OnSetLocalDescriptionSuccess(); } \
NS_IMETHOD OnSetRemoteDescriptionSuccess(void) { return _to OnSetRemoteDescriptionSuccess(); } \
NS_IMETHOD OnSetLocalDescriptionError(uint32_t name, const char * message) { return _to OnSetLocalDescriptionError(name, message); } \
NS_IMETHOD OnSetRemoteDescriptionError(uint32_t name, const char * message) { return _to OnSetRemoteDescriptionError(name, message); } \
NS_IMETHOD OnAddIceCandidateSuccess(void) { return _to OnAddIceCandidateSuccess(); } \
NS_IMETHOD OnAddIceCandidateError(uint32_t name, const char * message) { return _to OnAddIceCandidateError(name, message); } \
NS_IMETHOD NotifyDataChannel(nsIDOMDataChannel *channel) { return _to NotifyDataChannel(channel); } \
NS_IMETHOD NotifyConnection(void) { return _to NotifyConnection(); } \
NS_IMETHOD NotifyClosedConnection(void) { return _to NotifyClosedConnection(); } \
NS_IMETHOD OnStateChange(uint32_t state) { return _to OnStateChange(state); } \
NS_IMETHOD OnAddStream(nsIDOMMediaStream *stream) { return _to OnAddStream(stream); } \
NS_IMETHOD OnRemoveStream(void) { return _to OnRemoveStream(); } \
NS_IMETHOD OnAddTrack(void) { return _to OnAddTrack(); } \
NS_IMETHOD OnRemoveTrack(void) { return _to OnRemoveTrack(); } \
NS_IMETHOD FoundIceCandidate(const char * candidate) { return _to FoundIceCandidate(candidate); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_IPEERCONNECTIONOBSERVER(_to) \
NS_IMETHOD OnCreateOfferSuccess(const char * offer) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCreateOfferSuccess(offer); } \
NS_IMETHOD OnCreateOfferError(uint32_t name, const char * message) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCreateOfferError(name, message); } \
NS_IMETHOD OnCreateAnswerSuccess(const char * answer) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCreateAnswerSuccess(answer); } \
NS_IMETHOD OnCreateAnswerError(uint32_t name, const char * message) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCreateAnswerError(name, message); } \
NS_IMETHOD OnSetLocalDescriptionSuccess(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSetLocalDescriptionSuccess(); } \
NS_IMETHOD OnSetRemoteDescriptionSuccess(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSetRemoteDescriptionSuccess(); } \
NS_IMETHOD OnSetLocalDescriptionError(uint32_t name, const char * message) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSetLocalDescriptionError(name, message); } \
NS_IMETHOD OnSetRemoteDescriptionError(uint32_t name, const char * message) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSetRemoteDescriptionError(name, message); } \
NS_IMETHOD OnAddIceCandidateSuccess(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnAddIceCandidateSuccess(); } \
NS_IMETHOD OnAddIceCandidateError(uint32_t name, const char * message) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnAddIceCandidateError(name, message); } \
NS_IMETHOD NotifyDataChannel(nsIDOMDataChannel *channel) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyDataChannel(channel); } \
NS_IMETHOD NotifyConnection(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyConnection(); } \
NS_IMETHOD NotifyClosedConnection(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyClosedConnection(); } \
NS_IMETHOD OnStateChange(uint32_t state) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStateChange(state); } \
NS_IMETHOD OnAddStream(nsIDOMMediaStream *stream) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnAddStream(stream); } \
NS_IMETHOD OnRemoveStream(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnRemoveStream(); } \
NS_IMETHOD OnAddTrack(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnAddTrack(); } \
NS_IMETHOD OnRemoveTrack(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnRemoveTrack(); } \
NS_IMETHOD FoundIceCandidate(const char * candidate) { return !_to ? NS_ERROR_NULL_POINTER : _to->FoundIceCandidate(candidate); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class _MYCLASS_ : public IPeerConnectionObserver
{
public:
NS_DECL_ISUPPORTS
NS_DECL_IPEERCONNECTIONOBSERVER
_MYCLASS_();
private:
~_MYCLASS_();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, IPeerConnectionObserver)
_MYCLASS_::_MYCLASS_()
{
/* member initializers and constructor code */
}
_MYCLASS_::~_MYCLASS_()
{
/* destructor code */
}
/* void onCreateOfferSuccess (in string offer); */
NS_IMETHODIMP _MYCLASS_::OnCreateOfferSuccess(const char * offer)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onCreateOfferError (in unsigned long name, in string message); */
NS_IMETHODIMP _MYCLASS_::OnCreateOfferError(uint32_t name, const char * message)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onCreateAnswerSuccess (in string answer); */
NS_IMETHODIMP _MYCLASS_::OnCreateAnswerSuccess(const char * answer)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onCreateAnswerError (in unsigned long name, in string message); */
NS_IMETHODIMP _MYCLASS_::OnCreateAnswerError(uint32_t name, const char * message)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onSetLocalDescriptionSuccess (); */
NS_IMETHODIMP _MYCLASS_::OnSetLocalDescriptionSuccess()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onSetRemoteDescriptionSuccess (); */
NS_IMETHODIMP _MYCLASS_::OnSetRemoteDescriptionSuccess()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onSetLocalDescriptionError (in unsigned long name, in string message); */
NS_IMETHODIMP _MYCLASS_::OnSetLocalDescriptionError(uint32_t name, const char * message)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onSetRemoteDescriptionError (in unsigned long name, in string message); */
NS_IMETHODIMP _MYCLASS_::OnSetRemoteDescriptionError(uint32_t name, const char * message)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onAddIceCandidateSuccess (); */
NS_IMETHODIMP _MYCLASS_::OnAddIceCandidateSuccess()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onAddIceCandidateError (in unsigned long name, in string message); */
NS_IMETHODIMP _MYCLASS_::OnAddIceCandidateError(uint32_t name, const char * message)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void notifyDataChannel (in nsIDOMDataChannel channel); */
NS_IMETHODIMP _MYCLASS_::NotifyDataChannel(nsIDOMDataChannel *channel)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void notifyConnection (); */
NS_IMETHODIMP _MYCLASS_::NotifyConnection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void notifyClosedConnection (); */
NS_IMETHODIMP _MYCLASS_::NotifyClosedConnection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onStateChange (in unsigned long state); */
NS_IMETHODIMP _MYCLASS_::OnStateChange(uint32_t state)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onAddStream (in nsIDOMMediaStream stream); */
NS_IMETHODIMP _MYCLASS_::OnAddStream(nsIDOMMediaStream *stream)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onRemoveStream (); */
NS_IMETHODIMP _MYCLASS_::OnRemoveStream()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onAddTrack (); */
NS_IMETHODIMP _MYCLASS_::OnAddTrack()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onRemoveTrack (); */
NS_IMETHODIMP _MYCLASS_::OnRemoveTrack()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void foundIceCandidate (in string candidate); */
NS_IMETHODIMP _MYCLASS_::FoundIceCandidate(const char * candidate)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/* starting interface: IPeerConnection */
#define IPEERCONNECTION_IID_STR "930dce8b-7c5e-4393-b8c0-cb3a928f68bd"
#define IPEERCONNECTION_IID \
{0x930dce8b, 0x7c5e, 0x4393, \
{ 0xb8, 0xc0, 0xcb, 0x3a, 0x92, 0x8f, 0x68, 0xbd }}
class NS_NO_VTABLE IPeerConnection : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(IPEERCONNECTION_IID)
enum {
kHintAudio = 1U,
kHintVideo = 2U,
kActionNone = -1,
kActionOffer = 0,
kActionAnswer = 1,
kActionPRAnswer = 2,
kIceGathering = 0,
kIceWaiting = 1,
kIceChecking = 2,
kIceConnected = 3,
kIceFailed = 4,
kNew = 0,
kNegotiating = 1,
kActive = 2,
kClosing = 3,
kClosed = 4,
kSignalingInvalid = 0,
kSignalingStable = 1,
kSignalingHaveLocalOffer = 2,
kSignalingHaveRemoteOffer = 3,
kSignalingHaveLocalPranswer = 4,
kSignalingHaveRemotePranswer = 5,
kSignalingClosed = 6,
kDataChannelReliable = 0U,
kDataChannelPartialReliableRexmit = 1U,
kDataChannelPartialReliableTimed = 2U,
kNoError = 0U,
kInvalidConstraintsType = 1U,
kInvalidCandidateType = 2U,
kInvalidMediastreamTrack = 3U,
kInvalidState = 4U,
kInvalidSessionDescription = 5U,
kIncompatibleSessionDescription = 6U,
kIncompatibleConstraints = 7U,
kIncompatibleMediaStreamTrack = 8U,
kInternalError = 9U,
kMaxErrorType = 9U
};
/* [implicit_jscontext] void initialize (in IPeerConnectionObserver observer, in nsIDOMWindow window, [optional] in jsval iceServers, [optional] in nsIThread thread); */
NS_IMETHOD Initialize(IPeerConnectionObserver *observer, nsIDOMWindow *window, const JS::Value & iceServers, nsIThread *thread, JSContext* cx) = 0;
/* [implicit_jscontext] void createOffer (in jsval constraints); */
NS_IMETHOD CreateOffer(const JS::Value & constraints, JSContext* cx) = 0;
/* [implicit_jscontext] void createAnswer (in jsval constraints); */
NS_IMETHOD CreateAnswer(const JS::Value & constraints, JSContext* cx) = 0;
/* void setLocalDescription (in long action, in string sdp); */
NS_IMETHOD SetLocalDescription(int32_t action, const char * sdp) = 0;
/* void setRemoteDescription (in long action, in string sdp); */
NS_IMETHOD SetRemoteDescription(int32_t action, const char * sdp) = 0;
/* void addStream (in nsIDOMMediaStream stream); */
NS_IMETHOD AddStream(nsIDOMMediaStream *stream) = 0;
/* void removeStream (in nsIDOMMediaStream stream); */
NS_IMETHOD RemoveStream(nsIDOMMediaStream *stream) = 0;
/* void closeStreams (); */
NS_IMETHOD CloseStreams(void) = 0;
/* [implicit_jscontext] readonly attribute jsval localStreams; */
NS_IMETHOD GetLocalStreams(JSContext* cx, JS::Value *aLocalStreams) = 0;
/* [implicit_jscontext] readonly attribute jsval remoteStreams; */
NS_IMETHOD GetRemoteStreams(JSContext* cx, JS::Value *aRemoteStreams) = 0;
/* void addIceCandidate (in string candidate, in string mid, in unsigned short level); */
NS_IMETHOD AddIceCandidate(const char * candidate, const char * mid, uint16_t level) = 0;
/* void close (); */
NS_IMETHOD Close(void) = 0;
/* readonly attribute string localDescription; */
NS_IMETHOD GetLocalDescription(char * *aLocalDescription) = 0;
/* readonly attribute string remoteDescription; */
NS_IMETHOD GetRemoteDescription(char * *aRemoteDescription) = 0;
/* readonly attribute unsigned long iceState; */
NS_IMETHOD GetIceState(uint32_t *aIceState) = 0;
/* readonly attribute unsigned long readyState; */
NS_IMETHOD GetReadyState(uint32_t *aReadyState) = 0;
/* readonly attribute unsigned long signalingState; */
NS_IMETHOD GetSignalingState(uint32_t *aSignalingState) = 0;
/* readonly attribute unsigned long sipccState; */
NS_IMETHOD GetSipccState(uint32_t *aSipccState) = 0;
/* nsIDOMDataChannel createDataChannel (in ACString label, in ACString protocol, in unsigned short type, in boolean outOfOrderAllowed, in unsigned short maxTime, in unsigned short maxNum, in boolean externalNegotiated, in unsigned short stream); */
NS_IMETHOD CreateDataChannel(const nsACString & label, const nsACString & protocol, uint16_t type, bool outOfOrderAllowed, uint16_t maxTime, uint16_t maxNum, bool externalNegotiated, uint16_t stream, nsIDOMDataChannel * *_retval) = 0;
/* void connectDataConnection (in unsigned short localport, in unsigned short remoteport, in unsigned short numstreams); */
NS_IMETHOD ConnectDataConnection(uint16_t localport, uint16_t remoteport, uint16_t numstreams) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(IPeerConnection, IPEERCONNECTION_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_IPEERCONNECTION \
NS_IMETHOD Initialize(IPeerConnectionObserver *observer, nsIDOMWindow *window, const JS::Value & iceServers, nsIThread *thread, JSContext* cx); \
NS_IMETHOD CreateOffer(const JS::Value & constraints, JSContext* cx); \
NS_IMETHOD CreateAnswer(const JS::Value & constraints, JSContext* cx); \
NS_IMETHOD SetLocalDescription(int32_t action, const char * sdp); \
NS_IMETHOD SetRemoteDescription(int32_t action, const char * sdp); \
NS_IMETHOD AddStream(nsIDOMMediaStream *stream); \
NS_IMETHOD RemoveStream(nsIDOMMediaStream *stream); \
NS_IMETHOD CloseStreams(void); \
NS_IMETHOD GetLocalStreams(JSContext* cx, JS::Value *aLocalStreams); \
NS_IMETHOD GetRemoteStreams(JSContext* cx, JS::Value *aRemoteStreams); \
NS_IMETHOD AddIceCandidate(const char * candidate, const char * mid, uint16_t level); \
NS_IMETHOD Close(void); \
NS_IMETHOD GetLocalDescription(char * *aLocalDescription); \
NS_IMETHOD GetRemoteDescription(char * *aRemoteDescription); \
NS_IMETHOD GetIceState(uint32_t *aIceState); \
NS_IMETHOD GetReadyState(uint32_t *aReadyState); \
NS_IMETHOD GetSignalingState(uint32_t *aSignalingState); \
NS_IMETHOD GetSipccState(uint32_t *aSipccState); \
NS_IMETHOD CreateDataChannel(const nsACString & label, const nsACString & protocol, uint16_t type, bool outOfOrderAllowed, uint16_t maxTime, uint16_t maxNum, bool externalNegotiated, uint16_t stream, nsIDOMDataChannel * *_retval); \
NS_IMETHOD ConnectDataConnection(uint16_t localport, uint16_t remoteport, uint16_t numstreams);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_IPEERCONNECTION(_to) \
NS_IMETHOD Initialize(IPeerConnectionObserver *observer, nsIDOMWindow *window, const JS::Value & iceServers, nsIThread *thread, JSContext* cx) { return _to Initialize(observer, window, iceServers, thread, cx); } \
NS_IMETHOD CreateOffer(const JS::Value & constraints, JSContext* cx) { return _to CreateOffer(constraints, cx); } \
NS_IMETHOD CreateAnswer(const JS::Value & constraints, JSContext* cx) { return _to CreateAnswer(constraints, cx); } \
NS_IMETHOD SetLocalDescription(int32_t action, const char * sdp) { return _to SetLocalDescription(action, sdp); } \
NS_IMETHOD SetRemoteDescription(int32_t action, const char * sdp) { return _to SetRemoteDescription(action, sdp); } \
NS_IMETHOD AddStream(nsIDOMMediaStream *stream) { return _to AddStream(stream); } \
NS_IMETHOD RemoveStream(nsIDOMMediaStream *stream) { return _to RemoveStream(stream); } \
NS_IMETHOD CloseStreams(void) { return _to CloseStreams(); } \
NS_IMETHOD GetLocalStreams(JSContext* cx, JS::Value *aLocalStreams) { return _to GetLocalStreams(cx, aLocalStreams); } \
NS_IMETHOD GetRemoteStreams(JSContext* cx, JS::Value *aRemoteStreams) { return _to GetRemoteStreams(cx, aRemoteStreams); } \
NS_IMETHOD AddIceCandidate(const char * candidate, const char * mid, uint16_t level) { return _to AddIceCandidate(candidate, mid, level); } \
NS_IMETHOD Close(void) { return _to Close(); } \
NS_IMETHOD GetLocalDescription(char * *aLocalDescription) { return _to GetLocalDescription(aLocalDescription); } \
NS_IMETHOD GetRemoteDescription(char * *aRemoteDescription) { return _to GetRemoteDescription(aRemoteDescription); } \
NS_IMETHOD GetIceState(uint32_t *aIceState) { return _to GetIceState(aIceState); } \
NS_IMETHOD GetReadyState(uint32_t *aReadyState) { return _to GetReadyState(aReadyState); } \
NS_IMETHOD GetSignalingState(uint32_t *aSignalingState) { return _to GetSignalingState(aSignalingState); } \
NS_IMETHOD GetSipccState(uint32_t *aSipccState) { return _to GetSipccState(aSipccState); } \
NS_IMETHOD CreateDataChannel(const nsACString & label, const nsACString & protocol, uint16_t type, bool outOfOrderAllowed, uint16_t maxTime, uint16_t maxNum, bool externalNegotiated, uint16_t stream, nsIDOMDataChannel * *_retval) { return _to CreateDataChannel(label, protocol, type, outOfOrderAllowed, maxTime, maxNum, externalNegotiated, stream, _retval); } \
NS_IMETHOD ConnectDataConnection(uint16_t localport, uint16_t remoteport, uint16_t numstreams) { return _to ConnectDataConnection(localport, remoteport, numstreams); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_IPEERCONNECTION(_to) \
NS_IMETHOD Initialize(IPeerConnectionObserver *observer, nsIDOMWindow *window, const JS::Value & iceServers, nsIThread *thread, JSContext* cx) { return !_to ? NS_ERROR_NULL_POINTER : _to->Initialize(observer, window, iceServers, thread, cx); } \
NS_IMETHOD CreateOffer(const JS::Value & constraints, JSContext* cx) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateOffer(constraints, cx); } \
NS_IMETHOD CreateAnswer(const JS::Value & constraints, JSContext* cx) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateAnswer(constraints, cx); } \
NS_IMETHOD SetLocalDescription(int32_t action, const char * sdp) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLocalDescription(action, sdp); } \
NS_IMETHOD SetRemoteDescription(int32_t action, const char * sdp) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRemoteDescription(action, sdp); } \
NS_IMETHOD AddStream(nsIDOMMediaStream *stream) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddStream(stream); } \
NS_IMETHOD RemoveStream(nsIDOMMediaStream *stream) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveStream(stream); } \
NS_IMETHOD CloseStreams(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CloseStreams(); } \
NS_IMETHOD GetLocalStreams(JSContext* cx, JS::Value *aLocalStreams) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLocalStreams(cx, aLocalStreams); } \
NS_IMETHOD GetRemoteStreams(JSContext* cx, JS::Value *aRemoteStreams) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRemoteStreams(cx, aRemoteStreams); } \
NS_IMETHOD AddIceCandidate(const char * candidate, const char * mid, uint16_t level) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddIceCandidate(candidate, mid, level); } \
NS_IMETHOD Close(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \
NS_IMETHOD GetLocalDescription(char * *aLocalDescription) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLocalDescription(aLocalDescription); } \
NS_IMETHOD GetRemoteDescription(char * *aRemoteDescription) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRemoteDescription(aRemoteDescription); } \
NS_IMETHOD GetIceState(uint32_t *aIceState) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIceState(aIceState); } \
NS_IMETHOD GetReadyState(uint32_t *aReadyState) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReadyState(aReadyState); } \
NS_IMETHOD GetSignalingState(uint32_t *aSignalingState) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSignalingState(aSignalingState); } \
NS_IMETHOD GetSipccState(uint32_t *aSipccState) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSipccState(aSipccState); } \
NS_IMETHOD CreateDataChannel(const nsACString & label, const nsACString & protocol, uint16_t type, bool outOfOrderAllowed, uint16_t maxTime, uint16_t maxNum, bool externalNegotiated, uint16_t stream, nsIDOMDataChannel * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateDataChannel(label, protocol, type, outOfOrderAllowed, maxTime, maxNum, externalNegotiated, stream, _retval); } \
NS_IMETHOD ConnectDataConnection(uint16_t localport, uint16_t remoteport, uint16_t numstreams) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConnectDataConnection(localport, remoteport, numstreams); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class _MYCLASS_ : public IPeerConnection
{
public:
NS_DECL_ISUPPORTS
NS_DECL_IPEERCONNECTION
_MYCLASS_();
private:
~_MYCLASS_();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, IPeerConnection)
_MYCLASS_::_MYCLASS_()
{
/* member initializers and constructor code */
}
_MYCLASS_::~_MYCLASS_()
{
/* destructor code */
}
/* [implicit_jscontext] void initialize (in IPeerConnectionObserver observer, in nsIDOMWindow window, [optional] in jsval iceServers, [optional] in nsIThread thread); */
NS_IMETHODIMP _MYCLASS_::Initialize(IPeerConnectionObserver *observer, nsIDOMWindow *window, const JS::Value & iceServers, nsIThread *thread, JSContext* cx)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [implicit_jscontext] void createOffer (in jsval constraints); */
NS_IMETHODIMP _MYCLASS_::CreateOffer(const JS::Value & constraints, JSContext* cx)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [implicit_jscontext] void createAnswer (in jsval constraints); */
NS_IMETHODIMP _MYCLASS_::CreateAnswer(const JS::Value & constraints, JSContext* cx)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setLocalDescription (in long action, in string sdp); */
NS_IMETHODIMP _MYCLASS_::SetLocalDescription(int32_t action, const char * sdp)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setRemoteDescription (in long action, in string sdp); */
NS_IMETHODIMP _MYCLASS_::SetRemoteDescription(int32_t action, const char * sdp)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void addStream (in nsIDOMMediaStream stream); */
NS_IMETHODIMP _MYCLASS_::AddStream(nsIDOMMediaStream *stream)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void removeStream (in nsIDOMMediaStream stream); */
NS_IMETHODIMP _MYCLASS_::RemoveStream(nsIDOMMediaStream *stream)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void closeStreams (); */
NS_IMETHODIMP _MYCLASS_::CloseStreams()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [implicit_jscontext] readonly attribute jsval localStreams; */
NS_IMETHODIMP _MYCLASS_::GetLocalStreams(JSContext* cx, JS::Value *aLocalStreams)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [implicit_jscontext] readonly attribute jsval remoteStreams; */
NS_IMETHODIMP _MYCLASS_::GetRemoteStreams(JSContext* cx, JS::Value *aRemoteStreams)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void addIceCandidate (in string candidate, in string mid, in unsigned short level); */
NS_IMETHODIMP _MYCLASS_::AddIceCandidate(const char * candidate, const char * mid, uint16_t level)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void close (); */
NS_IMETHODIMP _MYCLASS_::Close()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute string localDescription; */
NS_IMETHODIMP _MYCLASS_::GetLocalDescription(char * *aLocalDescription)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute string remoteDescription; */
NS_IMETHODIMP _MYCLASS_::GetRemoteDescription(char * *aRemoteDescription)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute unsigned long iceState; */
NS_IMETHODIMP _MYCLASS_::GetIceState(uint32_t *aIceState)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute unsigned long readyState; */
NS_IMETHODIMP _MYCLASS_::GetReadyState(uint32_t *aReadyState)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute unsigned long signalingState; */
NS_IMETHODIMP _MYCLASS_::GetSignalingState(uint32_t *aSignalingState)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute unsigned long sipccState; */
NS_IMETHODIMP _MYCLASS_::GetSipccState(uint32_t *aSipccState)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIDOMDataChannel createDataChannel (in ACString label, in ACString protocol, in unsigned short type, in boolean outOfOrderAllowed, in unsigned short maxTime, in unsigned short maxNum, in boolean externalNegotiated, in unsigned short stream); */
NS_IMETHODIMP _MYCLASS_::CreateDataChannel(const nsACString & label, const nsACString & protocol, uint16_t type, bool outOfOrderAllowed, uint16_t maxTime, uint16_t maxNum, bool externalNegotiated, uint16_t stream, nsIDOMDataChannel * *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void connectDataConnection (in unsigned short localport, in unsigned short remoteport, in unsigned short numstreams); */
NS_IMETHODIMP _MYCLASS_::ConnectDataConnection(uint16_t localport, uint16_t remoteport, uint16_t numstreams)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
#endif /* __gen_IPeerConnection_h__ */
|