internal Activity(Contact c,  Banshee.Telepathy.API.Channels.ITube tube)
            : base(c, tube)
        {
            string service = tube.Service;
            Key = service;

            //            if (c.HasService (service)) {
            //                ContactService s = c.GetService (service);
            //                this.service = s;
            //            } else {
            //                throw new InvalidOperationException (String.Format ("Contact does not support service {0}",
            //                                                                    service));
            //            }

            this.tube = tube;
        }
        internal Activity(Contact c, Banshee.Telepathy.API.Channels.ITube tube) : base(c, tube)
        {
            string service = tube.Service;

            Key = service;

//            if (c.HasService (service)) {
//                ContactService s = c.GetService (service);
//                this.service = s;
//            } else {
//                throw new InvalidOperationException (String.Format ("Contact does not support service {0}",
//                                                                    service));
//            }

            this.tube = tube;
        }
        protected override void Dispose(bool disposing)
        {
            if (IsDisposed)
            {
                return;
            }

            if (disposing)
            {
                Close();

                if (tube != null)
                {
                    tube.ChannelReady -= OnChannelReady;
                    tube.Closed       -= OnTubeClosed;
                    tube.TubeOffered  -= OnTubeOffered;
                    tube.Dispose();
                    tube = null;
                }
            }

            base.Dispose(disposing);
        }
        protected override void Dispose(bool disposing)
        {
            if (IsDisposed) {
                return;
            }

            if (disposing) {
                Close ();

                if (tube != null) {
                    tube.ChannelReady -= OnChannelReady;
                    tube.Closed -= OnTubeClosed;
                    tube.TubeOffered -= OnTubeOffered;
                    tube.Dispose ();
                    tube = null;
                }
            }

            base.Dispose (disposing);
        }