Esempio n. 1
0
        public SubscriptionSession takeSessionOwnership()
        {
            IntPtr cPtr             = tinyWRAPPINVOKE.SubscriptionEvent_takeSessionOwnership(swigCPtr);
            SubscriptionSession ret = (cPtr == IntPtr.Zero) ? null : new SubscriptionSession(cPtr, false);

            return(ret);
        }
Esempio n. 2
0
        public SubscriptionSession getSession()
        {
            IntPtr cPtr             = tinyWRAPPINVOKE.SubscriptionEvent_getSession(swigCPtr);
            SubscriptionSession ret = (cPtr == IntPtr.Zero) ? null : new SubscriptionSession(cPtr, false);

            return(ret);
        }
Esempio n. 3
0
 internal static HandleRef getCPtr(SubscriptionSession obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
Esempio n. 4
0
        public MySubscriptionSession(MySipStack sipStack, String toUri, EVENT_PACKAGE_TYPE eventPackage)
            : base(sipStack)
        {
            this.session = new SubscriptionSession(sipStack);
            this.eventPackage = eventPackage;

            // commons
            base.init();

            // SigComp
            base.SigCompId = sipStack.SigCompId;

            switch (eventPackage)
            {
                case EVENT_PACKAGE_TYPE.CONFERENCE:
                    this.session.addHeader("Event", "conference");
                    this.session.addHeader("Accept", ContentType.CONFERENCE_INFO);
                    break;
                case EVENT_PACKAGE_TYPE.DIALOG:
                    this.session.addHeader("Event", "dialog");
                    this.session.addHeader("Accept", ContentType.DIALOG_INFO);
                    break;
                case EVENT_PACKAGE_TYPE.MESSAGE_SUMMARY:
                    this.session.addHeader("Event", "message-summary");
                    this.session.addHeader("Accept", ContentType.MESSAGE_SUMMARY);
                    break;
                case EVENT_PACKAGE_TYPE.PRESENCE:
                case EVENT_PACKAGE_TYPE.PRESENCE_LIST:
                    this.session.addHeader("Event", "presence");
                    if (eventPackage == EVENT_PACKAGE_TYPE.PRESENCE_LIST)
                    {
                        this.session.addHeader("Supported", "eventlist");
                    }
                    this.session.addHeader("Accept",
                            String.Format("{0}, {1}, {2}, {3}",
                                    ContentType.MULTIPART_RELATED,
                                    ContentType.PIDF,
                                    ContentType.RLMI,
                                    ContentType.RPID
                                    ));
                    break;
                case EVENT_PACKAGE_TYPE.REG:
                    this.session.addHeader("Event", "reg");
                    this.session.addHeader("Accept", ContentType.REG_INFO);
                    // 3GPP TS 24.229 5.1.1.6 User-initiated deregistration
                    this.session.setSilentHangup(true);
                    break;
                case EVENT_PACKAGE_TYPE.SIP_PROFILE:
                    this.session.addHeader("Event", "sip-profile");
                    this.session.addHeader("Accept", ContentType.OMA_DEFERRED_LIST);
                    break;
                case EVENT_PACKAGE_TYPE.UA_PROFILE:
                    this.session.addHeader("Event", "ua-profile");
                    this.session.addHeader("Accept", ContentType.XCAP_DIFF);
                    break;
                case EVENT_PACKAGE_TYPE.WINFO:
                    this.session.addHeader("Event", "presence.winfo");
                    this.session.addHeader("Accept", ContentType.WATCHER_INFO);
                    break;
                case EVENT_PACKAGE_TYPE.XCAP_DIFF:
                    this.session.addHeader("Event", "xcap-diff");
                    this.session.addHeader("Accept", ContentType.XCAP_DIFF);
                    break;
            }

            this.ToUri = toUri;
            // common to all subscription sessions
            this.session.addHeader("Allow-Events", "refer, presence, presence.winfo, xcap-diff, conference");
        }
Esempio n. 5
0
 internal static HandleRef getCPtr(SubscriptionSession obj) {
   return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }