Examples of CallLog


Examples of com.thoughtworks.xstream.testutil.CallLog

        }
    }

    public void testObjectOutputStreamPropagatesCloseAndFlushEvents() throws IOException {
        // setup
        final CallLog log = new CallLog();
        Writer loggingWriter = new Writer() {
            public void close() {
                log.actual("close");
            }

            public void flush() {
                log.actual("flush");
            }

            public void write(char cbuf[], int off, int len) {
                // don't care about this
            }
        };

        // expectations
        log.expect("flush"); // TWO flushes are currently caused. Only one is needed, but
                                // this is no big deal.
        log.expect("flush");
        log.expect("close");

        // execute
        ObjectOutputStream objectOutputStream = xstream.createObjectOutputStream(loggingWriter);
        objectOutputStream.flush();
        objectOutputStream.close();

        // verify
        log.verify();
    }
View Full Code Here

Examples of com.thoughtworks.xstream.testutil.CallLog

        log.verify();
    }

    public void testObjectInputStreamPropegatesCloseEvent() throws IOException {
        // setup
        final CallLog log = new CallLog();
        Reader loggingReader = new StringReader("<int>1</int>") {
            public void close() {
                log.actual("close");
            }
        };

        // expectations
        log.expect("close");

        // execute
        ObjectInputStream objectInputStream = xstream.createObjectInputStream(loggingReader);
        objectInputStream.close();

        // verify
        log.verify();
    }
View Full Code Here

Examples of net.rim.blackberry.api.phone.phonelogs.CallLog

        final int numberOfCalls = CallLogNamespace.numberOfLogsInFolder(folderID);
        final Vector found = new Vector();
        int iElement = 0;

        for (int i = 0; i < numberOfCalls; i++) {
            final CallLog l = CallLogNamespace.callLogAt(i, folderID);
            final CallLogObject log = new CallLogObject(l);
            if (testable != null) {
                if (testable.test(log)) {
                    FindNamespace.insertElementByOrder(found, log, orderByField, isAscending);
                    iElement++;
View Full Code Here

Examples of net.rim.blackberry.api.phone.phonelogs.CallLog

        public Object invoke(final Object thiz, final Object[] args) throws Exception {
            if (args != null) {
                final int len = args.length;
                if (len == 2) {
                    final int index = ((Integer) args[0]).intValue();
                    final CallLog callLog = callLogAt(index, ((Integer) args[1]).intValue());

                    if (callLog != null) {
                        return new CallLogObject(callLog);
                    }
                }
View Full Code Here

Examples of net.rim.blackberry.api.phone.phonelogs.CallLog

            _view.setDataTemplateFocus(BackgroundFactory
                    .createLinearGradientBackground(Color.LIGHTBLUE,
                            Color.LIGHTBLUE, Color.BLUE, Color.BLUE));
            final DataTemplate dataTemplate = new DataTemplate(_view, 1, 1) {
                public Field[] getDataFields(final int modelRowIndex) {
                    final CallLog log = (CallLog) _model.getRow(modelRowIndex);
                    String text;
                    if (log instanceof PhoneCallLog) {
                        final PhoneCallLog phoneCallLog = (PhoneCallLog) log;
                        text = phoneCallLog.getParticipant().getNumber();
                    } else {
View Full Code Here

Examples of net.rim.blackberry.api.phone.phonelogs.CallLog

                // Create a new reference to the currently seleccted table. Must
                // be final
                // so that it can be referenced from anonymous inner classes.
                final PhoneCallTable tableRef = table;
                if (tableRef.getNumberOfRows() > 0) {
                    final CallLog callLog = table.getSelectedItem();

                    // Create menu item to view the currently selected call
                    final MenuItem viewItem =
                            new MenuItem(new StringProvider("View"), 0x230010,
                                    100);
View Full Code Here

Examples of org.jivesoftware.openfire.sip.calllog.CallLog

        String username = iq.getTo().toBareJID().split("@")[0];

        if (username != null) {

            CallLog callLog = new CallLog(username);
            Element pe = iq.getChildElement().element("callLog");

            if (pe != null) {

                Element numA = pe.element("numA");
                Element numB = pe.element("numB");
                Element duration = pe.element("duration");
                Element type = pe.element("type");

                callLog.setNumA((numA != null) ? numA.getTextTrim() : "");
                callLog.setNumB((numB != null) ? numB.getTextTrim() : "");
                callLog.setDateTime(new Date().getTime());
                callLog.setDuration((duration != null) ? Integer.parseInt(duration.getText()) : 0);
                if (type != null && "loss".equals(type.getTextTrim())) {
                    // Backwards compatibility change
                    type.setText("missed");
                }
                callLog.setType((type != null) ? CallLog.Type.valueOf(type.getTextTrim()) : CallLog.Type.dialed);

                try {
                    CallLogDAO.insert(callLog);
                } catch (SQLException e) {
                    Log.error(e.getMessage(), e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.