Click here to Skip to main content
15,884,353 members
Articles / Programming Languages / C#

Remote Access .NET CF Devices

Rate me:
Please Sign up or sign in to vote.
4.94/5 (16 votes)
8 Jan 2010CDDL18 min read 36K   3.2K   60  
Implementing remote access to .NET enabled devices.
//-----------------------------------------------------------------------
// <copyright file="BasicFunctionalityServer.cs" company="Matjazev.NET">
//     Copyright (c) www.matjazev.net. All rights reserved.
// </copyright>
// <author>Matjaz Prtenjak</author>
//-----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using Matjazev.Tcp.Plugin.Interfaces;

namespace Matjazev.Tcp.Plugin
{
  [TCPServerPluginAttribute]
  public class BasicFunctionalityServer : Plugin
  {
    #region Actions
    public void ExecuteReloadPlugins(IAction action, ref IAction outAction)
    {
      PluginsManager.Inst.ReLoadPlugins();
      CommonUtils.AddSubElement(outAction.Job, "value", "server", "OK");
    }

    public void ExecuteGetPluginsData(IAction action, ref IAction outAction)
    {
      CommonUtils.PluginDataToXML(outAction.Job, true);
      CommonUtils.AddSubElement(outAction.Job, "value", "server", "OK");
    }
    #endregion

    public override IBasicPluginData Description()
    {
      return new BasicPluginData("Basic Server Functionality", "1.0 beta", "Matja� Prtenjak");
    }

    public BasicFunctionalityServer()
    {
      addServerAction("getPluginsData", this.ExecuteGetPluginsData);
      addServerAction("reloadPlugins", this.ExecuteReloadPlugins);
    }
  }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Common Development and Distribution License (CDDL)


Written By
Software Developer (Senior) MERKUR D.D.
Slovenia Slovenia
I am a software developer in one of the largest retailer in our country. My job is (beside else) also in setting some standards in SW development throughout our company.

I have a M.Sc. in computer science and 20 years of experience. I have written 2 books in Slovenian language and both are sold out (the first about C++ language and the second about VBA language)...

Comments and Discussions