Example #1
0
 internal CData(CItem parent) : base(parent)
 {
     if (!(parent is CEntryItem))
     {
         throw new Exception("Internal error");
     }
 }
Example #2
0
 internal COrganizerEntries(CItem parent, IOrganizer medOrganizer, int index, COrganizer.EType type) : base(parent)
 {
     if (!(parent is COrganizer))
     {
         throw new Exception("Internal error");
     }
     this.Index           = index;
     this.Type            = type;
     this.MedOrganizer    = medOrganizer;
     this.EntryDescriptor = new COrganizerEntries.CEntryDescriptor(this, this.MedOrganizer);
     try
     {
         this.ReadOnly = (this.MedOrganizer.ReadOnly != 0);
     }
     catch (Exception ex)
     {
         Console.WriteLine(this.ToString() + "Unable to query ReadOnly property [ " + ex.Message + " ]");
         this.ReadOnly = true;
     }
     try
     {
         this.Growable = (this.MedOrganizer.Growable != 0);
     }
     catch (Exception ex2)
     {
         Console.WriteLine(this.ToString() + "Unable to query Growable property [ " + ex2.Message + " ]");
         this.Growable = false;
         this.ReadOnly = true;
     }
 }
Example #3
0
 internal CFileSystem(CItem parent, ICapability capability) : base(parent)
 {
     if (!(parent is CSource))
     {
         throw new Exception("Internal error");
     }
     this.MedFileSystem = (IFileSystem)capability;
     try
     {
         this.MIDP = (CFileSystem.EMIDP) this.MedFileSystem.MIDP;
     }
     catch (Exception ex)
     {
         Console.WriteLine(this.ToString() + " : Unable to query MIDP version [ " + ex.Message + " ]");
     }
     try
     {
         this.RootFolder = new CFolder(this, (IFolder)this.MedFileSystem.GetFolder("\\"));
     }
     catch (Exception ex2)
     {
         this.RootFolder = null;
         Console.WriteLine(this.ToString() + " : Unable to query root folder [ " + ex2.Message + " ]");
     }
 }
Example #4
0
 internal CSignal(CItem parent, int maximum, int minimum, int step, int strength) : base(parent)
 {
     this.Maximum  = maximum;
     this.Minimum  = minimum;
     this.Step     = step;
     this.Strength = strength;
 }
Example #5
0
 internal CSources(CItem parent) : base(parent)
 {
     if (!(parent is CDriver))
     {
         throw new Exception("Internal error");
     }
     this.MedApplication = ((CDriver)parent).MedApplication;
 }
Example #6
0
 internal CNetwork(CItem parent, string operatorName, int mcc, int mnc, int lac, int cid) : base(parent)
 {
     this.Operator = operatorName;
     this.MNC      = mnc;
     this.MCC      = mcc;
     this.LAC      = lac;
     this.CID      = cid;
 }
Example #7
0
 internal CSmsItems(CItem parent, ISMSFolder medSmsFolder) : base(parent)
 {
     if (!(parent is CSms))
     {
         throw new Exception("Internal error");
     }
     this.MedSmsFolder = medSmsFolder;
 }
Example #8
0
 internal CLicense(CItem parent, IMedLicense medLicense) : base(parent)
 {
     if (!(parent is CDriver))
     {
         throw new Exception("Internal error");
     }
     this.MedLicense = medLicense;
 }
Example #9
0
 internal CFolders(CItem parent, IFolder medFolder) : base(parent)
 {
     if (!(parent is CFolder))
     {
         throw new Exception("Internal error");
     }
     this.MedFolder = medFolder;
 }
Example #10
0
 internal CModels(CItem parent) : base(parent)
 {
     if (!(parent is CDriver))
     {
         throw new Exception("Internal error");
     }
     this.MedApplication = ((CDriver)parent).MedApplication;
     this.MedSettings    = (IMedSettings)this.MedApplication.Settings;
 }
Example #11
0
 internal CPhonebooks(CItem parent, ICapability medCapability) : base(parent)
 {
     if (!(parent is CSource))
     {
         throw new Exception("Internal error");
     }
     this.MedCapability = medCapability;
     this.Update();
 }
Example #12
0
 internal CPhonebookEntries(CItem parent, IPhonebook medPhoneBook) : base(parent)
 {
     if (!(parent is CPhonebook))
     {
         throw new Exception("Internal error");
     }
     this.MedPhonebook    = medPhoneBook;
     this.EmptyList       = new LinkedList <IPhonebookItem>();
     this.EmptyListToPush = new LinkedList <IPhonebookItem>();
 }
Example #13
0
 public CEntryItem(CItem parent, CEntryItem.EDataType[] supportedTypes) : base(parent)
 {
     if (!(parent is CEntry))
     {
         parent = null;
         throw new Exception("Internal error");
     }
     this.DataType       = CEntryItem.EDataType.Empty;
     this.SupportedTypes = supportedTypes;
 }
Example #14
0
 internal CAddressData(CItem parent, CEntryItem.EDataType type, CEntryItem.CDescriptor entryDescriptor) : base(parent)
 {
     this.StreetMaxLength  = entryDescriptor.MaxDataLengths[CEntryItem.EDataType.Street];
     this.StateMaxLength   = entryDescriptor.MaxDataLengths[CEntryItem.EDataType.State];
     this.CityMaxLength    = entryDescriptor.MaxDataLengths[CEntryItem.EDataType.City];
     this.POBoxMaxLength   = entryDescriptor.MaxDataLengths[CEntryItem.EDataType.POBox];
     this.ZipMaxLength     = entryDescriptor.MaxDataLengths[CEntryItem.EDataType.Zip];
     this.CountryMaxLength = entryDescriptor.MaxDataLengths[CEntryItem.EDataType.Country];
     this.AddrextMaxLength = entryDescriptor.MaxDataLengths[CEntryItem.EDataType.Addrext];
 }
Example #15
0
 internal CFile(CItem parent, IFolderFile medFolderFile) : base(parent)
 {
     if (!(parent is CFiles))
     {
         throw new Exception("Internal error");
     }
     this.MedFolderFile = medFolderFile;
     this.Name          = this.MedFolderFile.Name;
     this.Size          = this.MedFolderFile.Size;
     this.ReadOnly      = (this.MedFolderFile.IsReadOnly != 0);
     this.Changed       = false;
 }
Example #16
0
 internal CModel(CItem parent, int id, string manufacturer, string model, bool enabled) : base(parent)
 {
     if (!(parent is CModels))
     {
         throw new Exception("Internal error");
     }
     this.Model        = model;
     this.Manufacturer = manufacturer;
     this.Id           = id;
     this.Enabled      = enabled;
     this.WasEnabled   = enabled;
 }
Example #17
0
 internal CPort(CItem parent, int id, string portName, int portType, int portNumber, bool enabled) : base(parent)
 {
     if (!(parent is CPorts))
     {
         throw new Exception("Internal error");
     }
     this.PortName   = portName;
     this.Id         = id;
     this.Enabled    = enabled;
     this.WasEnabled = enabled;
     this.Type       = (CPort.EType)portType;
 }
Example #18
0
 internal CSmsItem(CItem parent, ISMS medSms) : base(parent)
 {
     if (!(parent is CSmsItems))
     {
         throw new Exception("Internal error");
     }
     this.MedSms = medSms;
     this.Text   = medSms.Text;
     this.Type   = (CSmsItem.EType)medSms.Type;
     this.State  = (CSmsItem.EState)medSms.State;
     this.Number = "";
     if (this.Type == CSmsItem.EType.StatusReport || this.Type == CSmsItem.EType.Submit)
     {
         this.Number = medSms.ToNumber;
     }
     if (this.Type == CSmsItem.EType.Deliver)
     {
         this.Number = medSms.FromNumber;
     }
     this.ServiceCenter = medSms.ServiceCenter;
     if (this.Type == CSmsItem.EType.StatusReport)
     {
         this.Status = medSms.Status;
     }
     this.ReceivedTimezone = medSms.ReceivedTimezone;
     this.ReceivedTime     = DateTime.MinValue;
     try
     {
         int num;
         this.ReceivedTime = medSms.GetReceivedTimestamp(out num);
         if (num == 0)
         {
             this.ReceivedTime = DateTime.MinValue;
         }
     }
     catch
     {
     }
     this.SentTime = DateTime.MinValue;
     try
     {
         int num;
         this.SentTime = medSms.GetSentTimestamp(out num);
         if (num == 0)
         {
             this.SentTime = DateTime.MinValue;
         }
     }
     catch
     {
     }
 }
Example #19
0
 internal CMessage(CItem parent) : base(parent)
 {
     if (!(parent is CSms))
     {
         throw new Exception("Cannot new");
     }
     this.Text          = "";
     this.Number        = "";
     this.RequestReport = false;
     this.Validity      = CMessage.EValidity.Maximal;
     this.Reference     = 0;
     this.ServiceCenter = "";
 }
Example #20
0
        internal CFolder(CItem parent, IFolder medFolder) : base(parent)
        {
            if (!(parent is CFolders) && !(parent is CFileSystem))
            {
                throw new Exception("Internal error");
            }
            this.MedFolder = medFolder;
            this.Name      = medFolder.Name;
            this.Storage   = (CFolder.EStorage) this.MedFolder.Storage;
            int arg_51_0 = this.MedFolder.FreeMemory;
            int arg_5D_0 = this.MedFolder.TotalMemory;

            this.Folders = new CFolders(this, this.MedFolder);
            this.Files   = new CFiles(this, this.MedFolder);
        }
Example #21
0
 internal CSource(CItem parent, IMedDataSource medDataSource) : base(parent)
 {
     if (!(parent is CSources))
     {
         throw new Exception("Internal error");
     }
     this._Online          = true;
     this.MedDataSource    = medDataSource;
     this.Label            = this.MedDataSource.Label;
     this.Manufacturer     = this.MedDataSource.Manufacturer;
     this.Model            = this.MedDataSource.Product;
     this.Id               = this.MedDataSource.Session;
     this.UniqueIdentifier = this.MedDataSource.UniqueId;
     this.DeviceType       = (CSource.EDeviceType) this.MedDataSource.Type;
     this.SourceId         = ++CSource.counter;
 }
Example #22
0
 internal CCallManagement(CItem parent, ICapability medCapability) : base(parent)
 {
     if (!(parent is CSource))
     {
         throw new Exception("Internal error");
     }
     this.MedCallCapability = (ICallCapability)medCapability;
     this.MedCallClass      = (this.MedCallCapability.GetClassDirect(67108864) as ICallClass);
     this.id = (base.Parent as CSource).MedDataSource.RegisterNotification((int)(base.Parent.Parent.Parent as CDriver).form.Handle, 32768 + (base.Parent as CSource).SourceId, medCapability.Id, 67108864);
     if (this.MedCallClass.StreamCount < 1)
     {
         Console.WriteLine(this.ToString() + " : No streams");
         this.MedCallStream = null;
         return;
     }
     this.MedCallStream = (this.MedCallClass.GetStream(1) as ICallStream);
 }
Example #23
0
        internal CSms(CItem parent, ICapability medCapability) : base(parent)
        {
            if (!(parent is CSource))
            {
                throw new Exception("CSms : Internal error");
            }
            this.MedCapability = medCapability;
            this.MedSmsOutbox  = null;
            ISMSFolder medSmsFolder = null;
            int        i            = 1;

            while (i <= this.MedCapability.ClassCount)
            {
                IClass @class = this.MedCapability.GetClass(i) as IClass;
                int    id     = @class.Id;
                switch (id)
                {
                case 33554432:
                    goto IL_87;

                case 33554433:
                    this.MedSmsOutbox = (@class as ISMSOutbox);
                    break;

                case 33554434:
                case 33554435:
                case 33554436:
                    break;

                default:
                    if (id == 33587200 || id == 33603584)
                    {
                        goto IL_87;
                    }
                    break;
                }
IL_8E:
                i++;
                continue;
IL_87:
                medSmsFolder = (@class as ISMSFolder);
                goto IL_8E;
            }
            this.Items = new CSmsItems(this, medSmsFolder);
        }
Example #24
0
        internal CPorts(CItem parent) : base(parent)
        {
            if (!(parent is CDriver))
            {
                throw new Exception("Cannot new");
            }
            this.MedApplication = ((CDriver)parent).MedApplication;
            this.MedSettings    = (IMedSettings)this.MedApplication.Settings;

            //int portCount = this.MedSettings.PortCount;
            //for (int i = 1; i <= portCount; i++)
            //{
            //    var port = MedSettings.GetPort(i);
            //    if (port != 0)
            //    this.MedSettings.RemovePort(port);
            //}
            //this.MedSettings.Save();
        }
Example #25
0
            internal CSmartCardReader(CItem parent, IMedDataSource dataSource) : base(parent, dataSource)
            {
                this.MedSmartCardReader = (ISmartCardReader)dataSource;
                IReaderState readerState;

                try
                {
                    readerState = (IReaderState)this.MedSmartCardReader.State;
                }
                catch (Exception ex)
                {
                    throw new Exception(this.ToString() + " : Cannot query IReaderState interface [ " + ex.Message + " ]");
                }
                this.Empty     = (readerState.Empty != 0);
                this.Exclusive = (readerState.Exclusive != 0);
                this.InUse     = (readerState.InUse != 0);
                this.Mute      = (readerState.Mute != 0);
                this.Present   = (readerState.Present != 0);
                this.Powered   = (readerState.Unpowered == 0);
                this.SIMState  = (CSource.CSmartCardReader.ESIMState)readerState.SIMState;
            }
Example #26
0
 internal virtual void Invalidate()
 {
     this._Parent = null;
 }
Example #27
0
 internal CItem(CItem parent)
 {
     this._Parent = parent;
 }
Example #28
0
 internal CNotes(CItem parent, IOrganizer medOrganizer, int index, COrganizer.EType type) : base(parent, medOrganizer, index, type)
 {
 }
Example #29
0
        internal COrganizer(CItem parent, ICapability medCapability) : base(parent)
        {
            if (!(parent is CSource))
            {
                throw new Exception("Internal error");
            }
            int num;

            try
            {
                num = medCapability.ClassCount;
            }
            catch (Exception ex)
            {
                Console.WriteLine(this.ToString() + "Unable to query ClassCount property [ " + ex.Message + " ]");
                num = 0;
            }
            this.MedOrganizers    = new IOrganizer[num];
            this.EmptyLists       = new LinkedList <IOrganizerItem> [num];
            this.EmptyListsToPush = new LinkedList <IOrganizerItem> [num];
            for (int i = 1; i <= num; i++)
            {
                IOrganizer organizer = medCapability.GetClass(i) as IOrganizer;
                this.EmptyLists[i - 1]       = new LinkedList <IOrganizerItem>();
                this.EmptyListsToPush[i - 1] = new LinkedList <IOrganizerItem>();
                if (organizer.SupportsEvents != 0)
                {
                    if (this.Events == null)
                    {
                        this.Events = new CEvents(this, organizer, i - 1, COrganizer.EType.Events);
                    }
                    else
                    {
                        Console.WriteLine(this.ToString() + " : Multiple streams for Events");
                    }
                }
                if (organizer.SupportsNotes != 0)
                {
                    if (this.Notes == null)
                    {
                        this.Notes = new CNotes(this, organizer, i - 1, COrganizer.EType.Notes);
                    }
                    else
                    {
                        Console.WriteLine(this.ToString() + " : Multiple streams for Notes");
                    }
                }
                if (organizer.SupportsTasks != 0 && this.Tasks == null)
                {
                    if (this.Tasks == null)
                    {
                        this.Tasks = new CTasks(this, organizer, i - 1, COrganizer.EType.Tasks);
                    }
                    else
                    {
                        Console.WriteLine(this.ToString() + " : Multiple streams for Tasks");
                    }
                }
                this.MedOrganizers[i - 1] = organizer;
            }
        }
Example #30
0
 protected CEntry(CItem parent) : base(parent)
 {
 }